diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15ae0cb..93f6103 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,9 +13,58 @@ permissions: contents: read jobs: - tox: - name: Test on Python ${{ matrix.py }} + tox-lint: + name: Linting Code Base + 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" + + 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: @@ -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