mirror of
https://github.com/aimingmed/aimingmed-ai.git
synced 2026-01-19 13:23:23 +08:00
use codecov again
This commit is contained in:
parent
5bb3d63adc
commit
3fa7ffe951
13
.github/workflows/template_unit_pytest.yml
vendored
13
.github/workflows/template_unit_pytest.yml
vendored
@ -56,12 +56,12 @@ jobs:
|
||||
cat Pipfile
|
||||
pipenv sync -d
|
||||
|
||||
- name: Run tests with pytest and generate coverage report
|
||||
- name: Run tests with pytest
|
||||
working-directory: ${{ env.WORKING_DIR }}
|
||||
run: |
|
||||
pipenv run pytest --version
|
||||
# Use the environment variables defined above for paths
|
||||
pipenv run pytest -v -s -o log_cli=true --junitxml=results.xml --cov=${{ env.SRC_PATH }} --cov-report term ${{ env.TESTS_PATH }}
|
||||
pipenv run pytest -v -s -o log_cli=true --junitxml=results.xml --cov=${{ env.SRC_PATH }} --cov-report=xml:${{ env.TESTS_COVERAGE_REPORT_PATH }} ${{ env.TESTS_PATH }}
|
||||
echo "Listing results in working directory:"
|
||||
ls -al ${{ github.workspace }}/${{ env.WORKING_DIR }}
|
||||
|
||||
@ -82,3 +82,12 @@ jobs:
|
||||
with:
|
||||
name: ${{ inputs.projectName }}-coverage-report
|
||||
path: ${{ env.TESTS_COVERAGE_REPORT_PATH }}
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
if: success() || failure() # always run
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
files: ${{ env.TESTS_COVERAGE_REPORT_PATH }}
|
||||
fail_ci_if_error: true
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user