From de4d47d87d5134ed92affbb41a0b2e07f24cf8ba Mon Sep 17 00:00:00 2001 From: rulego-team Date: Mon, 4 Aug 2025 07:42:25 +0800 Subject: [PATCH] =?UTF-8?q?ci:codecov-action=20=E4=BD=BF=E7=94=A8v3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 87 +++------------------------------------- 1 file changed, 5 insertions(+), 82 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4471cf..27e58d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,87 +45,10 @@ jobs: - name: Run tests with coverage if: matrix.go-version == '1.21' - run: go test -v -race -coverprofile=coverage.out -covermode=atomic -timeout 300s ./... + run: go test -v -race -coverprofile="codecov.report" -covermode=atomic -timeout 300s ./... - - name: Upload coverage to Codecov + - name: Upload coverage reports to Codecov if: matrix.go-version == '1.21' - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - - case-expression-tests: - name: CASE Expression Tests - runs-on: ubuntu-latest - - steps: - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.21' - - - name: Check out code - uses: actions/checkout@v4 - - - name: Cache Go modules - uses: actions/cache@v3 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-1.21-${{ hashFiles('**/go.sum') }} - - - name: Download dependencies - run: go mod download - - - name: Run CASE Expression Parsing Tests - run: go test -v -run TestCaseExpressionParsing -timeout 15s - - - name: Run CASE Expression Comprehensive Tests - run: go test -v -run TestCaseExpressionComprehensive -timeout 15s - - - name: Run CASE Expression Field Extraction Tests - run: go test -v -run TestCaseExpressionFieldExtraction -timeout 15s - - - name: Run CASE Expression in SQL Tests - run: go test -v -run TestCaseExpressionInSQL -timeout 15s - - - name: Run CASE Expression Aggregation Tests (with known limitations) - run: go test -v -run "TestCaseExpressionInAggregation|TestComplexCaseExpressionsInAggregation" -timeout 20s - - - name: Run CASE Expression Edge Cases - run: go test -v -run TestCaseExpressionEdgeCases -timeout 15s - -# lint: -# name: Lint -# runs-on: ubuntu-latest -# -# steps: -# - name: Set up Go -# uses: actions/setup-go@v4 -# with: -# go-version: '1.21' -# -# - name: Check out code -# uses: actions/checkout@v4 -# -# - name: Run golangci-lint -# uses: golangci/golangci-lint-action@v3 -# with: -# version: latest -# args: --timeout=5m -# -# security: -# name: Security Scan -# runs-on: ubuntu-latest -# -# steps: -# - name: Set up Go -# uses: actions/setup-go@v4 -# with: -# go-version: '1.21' -# -# - name: Check out code -# uses: actions/checkout@v4 -# -# - name: Run Gosec Security Scanner -# uses: securecodewarrior/github-action-gosec@v1 -# with: -# args: './...' \ No newline at end of file + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}