Skip to content

Commit

Permalink
ADD: coverage to github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ldevillez committed May 11, 2024
1 parent 5a1e023 commit ce71d08
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,30 @@ jobs:
files: "**/*.py"

- name: Set up Python all python version
if: steps.chaged-files.output.any_changed == 'true'
if: steps.changed-files.output.any_changed == 'true'
uses: actions/setup-python@v3
with:
python-version: 3.9

- name: Install dependencies
if: steps.chaged-files.output.any_changed == 'true'
if: steps.changed-files.output.any_changed == 'true'
run: sudo apt-get install libgirepository1.0-dev

- run: pip install --upgrade pip
if: steps.chaged-files.output.any_changed == 'true'
if: steps.changed-files.output.any_changed == 'true'
- run: pip install .
if: steps.chaged-files.output.any_changed == 'true'
if: steps.changed-files.output.any_changed == 'true'

- name: Run Test
if: steps.chaged-files.output.any_changed == 'true'
run: python -m unittest
if: steps.changed-files.output.any_changed == 'true'
run: coverage run -m unittest

- name: Create coverage xml
if: steps.changed-files.output.any_changed == 'true'
run: coverage xml coverage.xml

- name: Get Cover
uses: orgoro/[email protected]
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit ce71d08

Please sign in to comment.