diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4bfd1e3..6b0d8d9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,23 +24,20 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - cache: "pip" # caching pip dependencies + cache: "pip" - - name: Install dependencies + - name: Configure poetry run: | python -m pip install --upgrade pip python -m pip install poetry - python -m poetry install - - name: Lint with flake8 + - name: Install dependencies run: | - # stop the build if there are Python syntax errors or undefined names - python -m poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - python -m poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest + python -m poetry install + - name: Test with pytest and create coverage report run: | python -m poetry run coverage run --source=panoptica -m pytest - - name: Upload results to Codecov + python -m poetry run coverage xml + - name: Upload coverage results to Codecov (Only on merge to main) # Only upload to Codecov after a merge to the main branch if: github.ref == 'refs/heads/main' && github.event_name == 'push' uses: codecov/codecov-action@v4