Skip to content

Commit

Permalink
Merge pull request #44 from hv0905/coverage
Browse files Browse the repository at this point in the history
Add test result report & coverage for both python versions
  • Loading branch information
hv0905 authored Aug 21, 2024
2 parents 309f64d + 806c52f commit d44817e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/test_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,20 @@ jobs:
pip install -r requirements.dev.txt
- name: Test the code with pytest
run: |
pytest --cov=app .
pytest --cov=app --junitxml=junit.xml .
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: "python-${{ matrix.python-version }}"
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/[email protected]
if: ${{ matrix.python-version == '3.11' }} # Only upload coverage reports for the latest Python version
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# if: ${{ matrix.python-version == '3.11' }} # Only upload coverage reports for the latest Python version
with:
flags: "python-${{ matrix.python-version }}"
token: ${{ secrets.CODECOV_TOKEN }}
- name: Analysing the code with pylint
run: |
pylint --rc-file pylintrc.toml -j 0 app scripts tests && lint_result=$? || lint_result=$?
exit $(( $lint_result & 35 ))

0 comments on commit d44817e

Please sign in to comment.