diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9179392..be0313b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,6 +10,24 @@ permissions: contents: read jobs: + linting: + name: Linting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python 3.12 + uses: actions/setup-python@v4 + with: + python-version: "3.12" + + - name: Install required packages + run: python -m pip install --upgrade tox + + - name: Run linters + run: tox -e lint + + tests: name: Python ${{ matrix.python-version }} runs-on: ubuntu-latest @@ -43,11 +61,6 @@ jobs: ENV_PREFIX=$(tr -C -d "0-9" <<< "${{ matrix.python-version }}") TOXENV=$(tox --listenvs | grep "^py$ENV_PREFIX" | tr '\n' ',') tox - - name: Run linters - if: ${{ matrix.python-version == '3.12' }} - run: | - tox -e lint - - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 with: @@ -58,7 +71,9 @@ jobs: deploy: name: Deploy - needs: [tests] + needs: + - linting + - tests runs-on: ubuntu-latest if: github.ref=='refs/heads/main' && github.event_name!='pull_request'