Skip to content

ADD: Add tests to improve coverage #107

ADD: Add tests to improve coverage

ADD: Add tests to improve coverage #107

Workflow file for this run

name: Python Tests
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
name: Checks unittest
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: "**/*.py"
#fetch_depth: 0
- name: Set up Python all python version
if: steps.changed-files..outputs.test_any_changed == 'true'

Check failure on line 22 in .github/workflows/tests.yml

View workflow run for this annotation

GitHub Actions / Python Tests

Invalid workflow file

The workflow is not valid. .github/workflows/tests.yml (Line: 22, Col: 13): Unexpected symbol: '.'. Located at position 21 within expression: steps.changed-files..outputs.test_any_changed == 'true' .github/workflows/tests.yml (Line: 32, Col: 13): Unexpected symbol: '.'. Located at position 21 within expression: steps.changed-files..outputs.test_any_changed == 'true'
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install dependencies
if: steps.changed-files.outputs.test_any_changed == 'true'
run: sudo apt-get install libgirepository1.0-dev
- run: pip install --upgrade pip
if: steps.changed-files..outputs.test_any_changed == 'true'
- run: pip install .
if: steps.changed-files..outputs.test_any_changed == 'true'
- name: Run Test
if: steps.changed-files..outputs.test_any_changed == 'true'
run: coverage run -m unittest
- name: Create coverage xml
if: steps.changed-files..outputs.test_any_changed == 'true'
run: coverage xml coverage.xml
- name: Get Cover
if: steps.changed-files..outputs.test_any_changed == 'true'
uses: orgoro/[email protected]
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}