Skip to content

Commit

Permalink
updated to a matrix strategy, removed flake8 modifiers, imporved test…
Browse files Browse the repository at this point in the history
… and coverage reporting
  • Loading branch information
benhovinga committed Dec 31, 2023
1 parent f3bdbbc commit 65fe30e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
# This workflow will install Python dependencies, run tests and lint with multiple versions of Python.

name: Python application

Expand All @@ -16,13 +15,18 @@ jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: "3.12"
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -33,7 +37,7 @@ jobs:
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
flake8 . --count --exit-zero --statistics
- name: Test with pytest
run: |
pytest
pytest -v --cov --no-cov-on-fail --cov-report term-missing

0 comments on commit 65fe30e

Please sign in to comment.