Skip to content

Commit

Permalink
Codecov: collect test analytics (#1281)
Browse files Browse the repository at this point in the history
  • Loading branch information
wil93 authored Nov 17, 2024
1 parent 80c7121 commit dd86dfa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,26 @@ jobs:
run: |
docker compose -p cms -f docker-compose.test.yml run --rm testcms
- uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
files: ./codecov/junit.xml
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload unit test coverage results to Codecov
uses: codecov/codecov-action@v4
if: ${{ !cancelled() }}
with:
files: ./codecov/unittests.xml
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}

- uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Upload functional test coverage results to Codecov
uses: codecov/codecov-action@v4
if: ${{ !cancelled() }}
with:
files: ./codecov/functionaltests.xml
flags: functionaltests
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion _cms-test-internal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dropdb --host=testdb --username=postgres cmsdbfortesting
createdb --host=testdb --username=postgres cmsdbfortesting
cmsInitDB

pytest --cov . --cov-report xml:codecov/unittests.xml
pytest --cov . --cov-report xml:codecov/unittests.xml --junitxml=codecov/junit.xml -o junit_family=legacy
UNIT=$?

dropdb --host=testdb --username=postgres cmsdbfortesting
Expand Down

0 comments on commit dd86dfa

Please sign in to comment.