Skip to content

Commit 399b90d

Browse files
authored
Merge pull request #213 from snok/sondrelg/django-v4
Add Django v4 to Python version > 3.8
2 parents 2d20c13 + 31468ad commit 399b90d

File tree

3 files changed

+278
-188
lines changed

3 files changed

+278
-188
lines changed

.github/workflows/testing.yml

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,39 +30,36 @@ jobs:
3030
strategy:
3131
fail-fast: false
3232
matrix:
33-
python-version: [ "3.8", "3.9", "3.10" ]
33+
python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10" ]
3434
django-version: [ "2.2", "3.0", "3.1", "3.2", "4.0" ]
3535
drf-version: [ "3.10", "3.11", "3.12" ]
36+
exclude:
37+
# Django v4 drops Python 3.6, and 3.7 support
38+
- django-version: 4.0
39+
python-version: 3.7
40+
- django-version: 4.0
41+
python-version: 3.6
3642
steps:
37-
- name: Check out repository
38-
uses: actions/checkout@v2
39-
- name: Set up python ${{ matrix.python-version }}
40-
uses: actions/setup-python@v2
43+
- uses: actions/checkout@v2
44+
- uses: actions/setup-python@v2
4145
with:
4246
python-version: ${{ matrix.python-version }}
43-
- name: Install poetry
44-
uses: snok/[email protected]
47+
- uses: snok/install-poetry@v1
4548
with:
46-
version: 1.1.6
4749
virtualenvs-in-project: true
4850
- name: Load cached venv
4951
id: cached-poetry-dependencies
5052
uses: actions/cache@v2
5153
with:
5254
path: .venv
53-
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
54-
- name: Install dependencies
55-
run: poetry install
55+
key: ${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}
56+
- run: poetry env use ${{ matrix.python-version }} && poetry install --no-root
5657
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
57-
- name: Install django ${{ matrix.django-version }}
58-
run: |
58+
- run: |
5959
source .venv/bin/activate
60-
poetry add "Django==${{ matrix.django-version }}"
61-
- name: Install DRF
62-
run: |
63-
source .venv/bin/activate
64-
poetry add "djangorestframework==${{ matrix.drf-version }}"
65-
- run: pip install pyjwt==1.7.1
60+
pip install "Django==${{ matrix.django-version }}"
61+
pip install "djangorestframework==${{ matrix.drf-version }}"
62+
pip install pyjwt==1.7.1
6663
- name: Run tests
6764
run: |
6865
source .venv/bin/activate

0 commit comments

Comments
 (0)