Skip to content

Commit

Permalink
Run codecov action only once (#7427)
Browse files Browse the repository at this point in the history
  • Loading branch information
youngbupark authored Apr 2, 2024
1 parent 36050b0 commit 72dfb50
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
20 changes: 20 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
codecov:
require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: "30...100"
status:
project:
default:
informational: true
target: auto
threshold: 0%

ignore:
- "**/mock_*.go" # ignore all mock files
- "pkg/armrpc/rpctest" # ignore all test helpers in rpctest
- "**/zz_generated*.go" # ignore autogenerated files from autorest
- "pkg/controller/api" # CRD related files
- "pkg/ucp/store/apiserverstore/api" # CRD related files
9 changes: 6 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,14 @@ jobs:
go install gotest.tools/gotestsum@v${{ env.GOTESTSUMVERSION }}
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: matrix.target_arch == 'amd64' && matrix.target_os == 'linux'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
codecov_yml_path: ./.codecov.yml
file: ./dist/unit_test/ut_coverage.out
flags: unittests
fail_ci_if_error: false
fail_ci_if_error: true
verbose: true
- name: Process Unit Test Results
uses: ./.github/actions/process-test-results
# Always is required here to make sure this target runs even when tests fail.
Expand Down
22 changes: 0 additions & 22 deletions codecov.yml

This file was deleted.

0 comments on commit 72dfb50

Please sign in to comment.