mirror of
https://github.com/jazzband/dj-database-url.git
synced 2026-03-16 22:20:24 +00:00
CI: run typechecks only once, not for each Django/Python version
This commit is contained in:
parent
7cc1121b29
commit
58ed5a2276
1 changed files with 20 additions and 15 deletions
35
.github/workflows/test.yml
vendored
35
.github/workflows/test.yml
vendored
|
|
@ -1,6 +1,25 @@
|
||||||
name: test
|
name: test
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
|
typecheck:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.13'
|
||||||
|
cache: 'pip'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pip install -e . -r requirements.txt
|
||||||
|
|
||||||
|
- name: Run mypy
|
||||||
|
run: python -m mypy dj_database_url
|
||||||
|
|
||||||
|
- name: Run pyright
|
||||||
|
run: python -m pyright dj_database_url
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
|
@ -30,14 +49,7 @@ jobs:
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: pip install -r requirements.txt "Django~=${{ matrix.django-version }}.0" .
|
||||||
pip install -r requirements.txt
|
|
||||||
pip install "Django~=${{ matrix.django-version }}.0" .
|
|
||||||
|
|
||||||
- name: Run type checking
|
|
||||||
run: |
|
|
||||||
python -m mypy dj_database_url
|
|
||||||
python -m pyright dj_database_url
|
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -47,10 +59,3 @@ jobs:
|
||||||
coverage xml
|
coverage xml
|
||||||
|
|
||||||
- uses: codecov/codecov-action@v4
|
- uses: codecov/codecov-action@v4
|
||||||
|
|
||||||
- name: Check types installation
|
|
||||||
run: |
|
|
||||||
pip install .
|
|
||||||
cd tests
|
|
||||||
python -m mypy .
|
|
||||||
python -m pyright .
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue