Skip to content

Commit

Permalink
job
Browse files Browse the repository at this point in the history
Signed-off-by: spacewander <[email protected]>
  • Loading branch information
spacewander committed Feb 27, 2024
1 parent 6e2ad29 commit 81aa164
Showing 1 changed file with 24 additions and 17 deletions.
41 changes: 24 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,12 @@ jobs:

- name: Test
run: make unit-test
- name: Upload to codecov
- name: Upload artifact
if: always() # always upload coverage, so the coverage percents won't affect by the failed tests
uses: codecov/codecov-action@v4.0.1
uses: actions/upload-artifact@v4
with:
fail_ci_if_error: false # let CI build pass if Codecov runs into an error during upload
file: ./cover.out
flags: unit-test
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
name: unit-test-cover
path: ./cover.out

plugins-integration-test:
timeout-minutes: 10
Expand Down Expand Up @@ -74,15 +71,12 @@ jobs:
if: always()
run: |
go tool covdata textfmt -i=/tmp/htnn_coverage -o plugins/tests/integration/cover.out -v 2
- name: Upload to codecov
- name: Upload artifact
if: always()
uses: codecov/codecov-action@v4.0.1
uses: actions/upload-artifact@v4
with:
fail_ci_if_error: false # let CI build pass if Codecov runs into an error during upload
file: plugins/tests/integration/cover.out
flags: plugins-integration-test
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
name: plugins-integration-test-cover
path: plugins/tests/integration/cover.out

controller-test:
timeout-minutes: 10
Expand Down Expand Up @@ -110,12 +104,25 @@ jobs:
- name: Test
run: make test
- name: Upload to codecov
- name: Upload artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: controller-test-cover
path: ./controller/cover.out

coverage:
timeout-minutes: 10
runs-on: ubuntu-latest
needs: [unit-test, plugins-integration-test, controller-test]
if: always()
steps:
- name: Download artifact
uses: actions/download-artifact@v4
- name: Upload to codecov
uses: codecov/[email protected]
with:
fail_ci_if_error: false # let CI build pass if Codecov runs into an error during upload
file: ./controller/cover.out
flags: controller-test
file: ./cover.out,plugins/tests/integration/cover.out,./controller/cover.out
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

0 comments on commit 81aa164

Please sign in to comment.