Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 2 additions & 40 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,53 +22,15 @@ jobs:
poetry install
- name: Run tests
id: run-tests
continue-on-error: true
run: >
poetry run pytest \
--junitxml=pytest.xml \
--cov-report=term-missing:skip-covered \
--cov-report=xml:coverage.xml \
--cov=src tests \
> ./pytest-coverage.txt;
cat ./pytest-coverage.txt;
- name: Upload pytest coverage artifacts.
uses: actions/upload-artifact@v3
with:
name: pytest-coverage
path: ./pytest-coverage.txt
- name: Upload pytest junitxml artifacts.
uses: actions/upload-artifact@v3
with:
name: pytest-junitxml
path: pytest.xml
- name: Checking testing success.
if: steps.run-tests.outcome != 'success'
run: exit 1;

coverage:
runs-on: ubuntu-latest
needs: unit
if: success() || failure()
permissions:
contents: read
pull-requests: write
steps:
- name: Get pytest artifacts
uses: actions/download-artifact@v3
with:
name: pytest-coverage
- name: Get pytest junitxml artifacts
uses: actions/download-artifact@v3
with:
name: pytest-junitxml
- name: Pytest coverage comment
if: github.event_name == 'pull_request'
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml
--log-level=DEBUG \
--verbose
- name: Upload coverage to Codecov
if: success() || failure()
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down