ci: update workflow dependicies on code coverage and build #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Coverage | |
on: | |
push: | |
workflow_run: | |
workflows: ["Unit Tests"] | |
types: [completed] | |
jobs: | |
on-success: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- run: echo 'The triggering workflow passed' | |
on-failure: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'failure' }} | |
steps: | |
- run: echo 'The triggering workflow failed' | |
coverage: | |
name: Measure code coverage | |
runs-on: windows-latest | |
needs: [on-success] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Install Poetry | |
run: pip install poetry | |
- name: Install dependencies | |
run: poetry install --no-interaction | |
- name: Run tests using coverage.py module | |
run: poetry run pytest --cov=. | |
- name: Generate lcov file | |
run: poetry run coverage-lcov | |
- name: Code Coverage Summary Report | |
uses: VGVentures/[email protected] | |
with: | |
path: lcov.info | |
min_coverage: 90 |