diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fec42fa0..52cb217d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,26 @@ on: [push, pull_request] jobs: + lint: + runs-on: ubuntu-latest + strategy: + matrix: + python_version: [3.8, 3.9, '3.10', '3.11'] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python_version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install hatch + - name: Lint and typecheck + run: | + hatch run lint-check + test: runs-on: ubuntu-latest strategy: @@ -20,13 +40,9 @@ jobs: run: | python -m pip install --upgrade pip pip install hatch - hatch env create - - name: Lint and typecheck - run: | - hatch run lint-check - name: Test run: | - hatch run test-cov-xml + hatch run test:test-cov-xml - uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} @@ -40,7 +56,7 @@ jobs: release: runs-on: ubuntu-latest - needs: test + needs: [lint, test] if: startsWith(github.ref, 'refs/tags/') steps: