Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 52 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,58 @@ permissions:
contents: read

jobs:
tox:
name: Test on Python ${{ matrix.py }}
tox-lint:
name: Linting Code Base
Comment thread
hspaans marked this conversation as resolved.
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v7

- name: Setup python for lint environment
uses: actions/setup-python@v7

- name: Install tox-gh
run: |
python -m pip install --upgrade pip
python -m pip install tox-gh

- name: Setup test suite
run: tox r -vv --notest

- name: Run linting suite
run: tox r -e lint --skip-pkg-install
env:
PYTEST_ADDOPTS: "-vv --durations=10"
Comment thread
hspaans marked this conversation as resolved.

tox-fix:
name: Fixing Code Base
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v7

- name: Setup python for fix environment
uses: actions/setup-python@v7

- name: Install tox-gh
run: |
python -m pip install --upgrade pip
python -m pip install tox-gh

- name: Setup test suite
run: tox r -vv --notest

- name: Run fixing suite
run: tox r -e fix --skip-pkg-install
env:
PYTEST_ADDOPTS: "-vv --durations=10"

tox-testing:
name: Testing Code Base on Python ${{ matrix.py }}
runs-on: ubuntu-latest
needs:
- tox-lint
- tox-fix
strategy:
fail-fast: false
matrix:
Expand All @@ -41,30 +90,6 @@ jobs:
run: tox r -vv --notest

- name: Run test suite
run: tox r --skip-pkg-install
run: tox r -e ${{ matrix.py }} --skip-pkg-install
env:
PYTEST_ADDOPTS: "-vv --durations=10"

lint:
name: Linting Code Base
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v7

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 flake8-bugbear flake8-docstrings flake8-github-annotations yamllint

- name: Lint with yamllint
run: |
yamllint . --format github

- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --format github
# 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 --format github