FIx CI to support Hatch test environment

This commit is contained in:
François Voron
2023-07-12 10:56:28 +02:00
parent a7b77cac73
commit 5b6d5d471a

View File

@@ -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: