Skip to content

Commit 425bf29

Browse files
authored
update ci configs and dependencies (#154)
1 parent 89b3e5b commit 425bf29

File tree

8 files changed

+82
-73
lines changed

8 files changed

+82
-73
lines changed

.circleci/config.yml

+28-54
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
1-
version: 2
1+
version: 2.1
22

33
workflows:
4-
version: 2
54
rest-auth-toolkit:
65
jobs:
7-
- test-py39
8-
- test-py38
6+
- test:
7+
name: test-py<< matrix.python >>-dj<< matrix.django >>
8+
matrix:
9+
parameters:
10+
python: ["3.9", "3.8"]
11+
django: ["3.2", "3.1", "2.2"]
912
- check
1013

1114
jobs:
1215

13-
test-py39:
16+
test:
17+
parameters:
18+
python:
19+
type: string
20+
django:
21+
type: string
1422
docker:
15-
- image: cimg/python:3.9
23+
- image: cimg/python:<< parameters.python >>
1624
- image: circleci/postgres:10.5
1725
environment:
1826
POSTGRES_DB: circle_test
@@ -25,62 +33,28 @@ jobs:
2533
- checkout
2634
- restore_cache:
2735
keys:
28-
- py39-v1-{{ arch }}-{{ checksum "requirements-test.txt" }}-{{ checksum "demo/requirements.txt" }}
29-
- py39-v1-{{ arch }}-{{ checksum "requirements-test.txt" }}
30-
- py39-v1-{{ arch }}-
36+
- py<< parameters.python >>-dj<< parameters.django >>-v1-{{ arch }}-{{ checksum "requirements-test.txt" }}-{{ checksum "demo/requirements.txt" }}
37+
- py<< parameters.python >>-dj<< parameters.django >>-v1-{{ arch }}-{{ checksum "requirements-test.txt" }}-
38+
- py<< parameters.python >>-dj<< parameters.django >>-v1-{{ arch }}-
3139
- run:
3240
name: Install CI tools
3341
command: |
3442
python3 -m venv venv
3543
venv/bin/pip install tox
3644
- run:
37-
name: Test with Python 3.9 and Django 2.2
38-
command: venv/bin/tox -e py39-dj22 -- --junitxml=~/reports/tox/coverage.xml
39-
- run:
40-
name: Test with Python 3.9 and Django 3.1
41-
command: venv/bin/tox -e py39-dj31
42-
- run:
43-
name: Check coverage with Python 3.9
44-
command: venv/bin/tox -e coverage
45-
- save_cache:
46-
key: py39-v1-{{ arch }}-{{ checksum "requirements-test.txt" }}-{{ checksum "demo/requirements.txt" }}
47-
paths:
48-
- venv
49-
- .tox
50-
- store_test_results:
51-
path: ~/reports
52-
53-
test-py38:
54-
docker:
55-
- image: cimg/python:3.8
56-
- image: circleci/postgres:11.7
57-
environment:
58-
POSTGRES_DB: circle_test
59-
POSTGRES_USER: testapp
60-
POSTGRES_PASSWORD: "wordpass"
61-
working_directory: ~/rest-auth-toolkit
62-
environment:
63-
DATABASE_URL: postgres://testapp:wordpass@localhost/circle_test
64-
steps:
65-
- checkout
66-
- restore_cache:
67-
keys:
68-
- py38-v2-{{ arch }}-{{ checksum "requirements-test.txt" }}-{{ checksum "demo/requirements.txt" }}
69-
- py38-v2-{{ arch }}-{{ checksum "requirements-test.txt" }}
70-
- py38-v2-{{ arch }}-
71-
- run:
72-
name: Install CI tools
45+
name: Test with Python << parameters.python >> and Django << parameters.django >>
7346
command: |
74-
python3 -m venv venv
75-
venv/bin/pip install tox
76-
- run:
77-
name: Test with Python 3.8 and Django 2.2
78-
command: venv/bin/tox -e py38-dj22 -- --junitxml=~/reports/tox/coverage.xml
79-
- run:
80-
name: Test with Python 3.8 and Django 3.1
81-
command: venv/bin/tox -e py38-dj31
47+
python="<< parameters.python >>"
48+
pyshort="${python//./}"
49+
venv/bin/tox -e py${pyshort}-dj<< parameters.django >> -- --junitxml=~/reports/tox/coverage.xml
50+
- when:
51+
condition: { equal: [<< parameters.python >>, "3.9"] }
52+
steps:
53+
- run:
54+
name: Check coverage with Python << parameters.python >>
55+
command: venv/bin/tox -e coverage
8256
- save_cache:
83-
key: py38-v2-{{ arch }}-{{ checksum "requirements-test.txt" }}-{{ checksum "demo/requirements.txt" }}
57+
key: py<< parameters.python >>-dj<< parameters.django>>-v1-{{ arch }}-{{ checksum "requirements-test.txt" }}-{{ checksum "demo/requirements.txt" }}
8458
paths:
8559
- venv
8660
- .tox

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

demo/demo/accounts/app.py

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
class AccountsConfig(AppConfig):
88
name = 'demo.accounts'
99
label = 'accounts'
10+
default_auto_field = 'django.db.models.BigAutoField'
1011

1112
def ready(self):
1213
from rest_auth_toolkit.fields import CustomEmailField
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Generated by Django 3.2.2 on 2021-05-11 19:56
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('accounts', '0004_auto_20210112_0329'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='emailconfirmation',
15+
name='id',
16+
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
17+
),
18+
migrations.AlterField(
19+
model_name='user',
20+
name='id',
21+
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
22+
),
23+
]

demo/requirements.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
flit
22
pip-tools ~= 5.4.0
33

4-
django == 3.1.*
4+
django == 3.2.*
55
djangorestframework
66
django-debug-toolbar
77
dj-database-url

demo/requirements.txt

+14-14
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,38 @@
44
#
55
# pip-compile requirements.in
66
#
7-
asgiref==3.3.1 # via django
7+
asgiref==3.3.4 # via django
88
certifi==2020.12.5 # via requests
99
chardet==4.0.0 # via requests
1010
click==7.1.2 # via pip-tools
1111
coreapi==2.3.3 # via -r requirements.in
1212
coreschema==0.0.4 # via coreapi
1313
dj-database-url==0.5.0 # via -r requirements.in
14-
django-debug-toolbar==3.2 # via -r requirements.in
14+
django-debug-toolbar==3.2.1 # via -r requirements.in
1515
django-model-utils==4.1.1 # via -r requirements.in
1616
django-shortuuidfield==0.1.3 # via -r requirements.in
17-
django==3.1.5 # via -r requirements.in, django-debug-toolbar, django-model-utils, django-shortuuidfield, djangorestframework
18-
djangorestframework==3.12.2 # via -r requirements.in
19-
docutils==0.16 # via flit
17+
django==3.2.2 # via -r requirements.in, django-debug-toolbar, django-model-utils, django-shortuuidfield, djangorestframework
18+
djangorestframework==3.12.4 # via -r requirements.in
19+
docutils==0.17.1 # via flit
2020
facepy==1.0.12 # via -r requirements.in
21-
flit-core==3.0.0 # via flit
22-
flit==3.0.0 # via -r requirements.in
21+
flit-core==3.2.0 # via flit
22+
flit==3.2.0 # via -r requirements.in
2323
idna==2.10 # via requests
2424
itypes==1.2.0 # via coreapi
25-
jinja2==2.11.2 # via coreschema
26-
markdown==3.3.3 # via -r requirements.in
25+
jinja2==2.11.3 # via coreschema
26+
markdown==3.3.4 # via -r requirements.in
2727
markupsafe==1.1.1 # via jinja2
2828
pip-tools==5.4.0 # via -r requirements.in
2929
psycopg2==2.8.6 # via -r requirements.in
30-
pygments==2.7.3 # via -r requirements.in
31-
pytoml==0.1.21 # via flit, flit-core
32-
pytz==2020.5 # via django
30+
pygments==2.9.0 # via -r requirements.in
31+
pytz==2021.1 # via django
3332
requests==2.25.1 # via coreapi, facepy, flit
3433
shortuuid==1.0.1 # via django-shortuuidfield
35-
six==1.15.0 # via django-shortuuidfield, facepy, pip-tools
34+
six==1.16.0 # via django-shortuuidfield, facepy, pip-tools
3635
sqlparse==0.4.1 # via django, django-debug-toolbar
36+
toml==0.10.2 # via flit, flit-core
3737
uritemplate==3.0.1 # via coreapi
38-
urllib3==1.26.2 # via requests
38+
urllib3==1.26.4 # via requests
3939

4040
# The following packages are considered to be unsafe in a requirements file:
4141
# pip

pyproject.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["flit_core>=2,<4"]
2+
requires = ["flit_core ~= 3.2.0"]
33
build-backend = "flit_core.buildapi"
44

55
[tool.flit.metadata]
@@ -21,10 +21,14 @@ classifiers = [
2121
"Framework :: Django",
2222
"Framework :: Django :: 2.2",
2323
"Framework :: Django :: 3.1",
24+
"Framework :: Django :: 3.2",
2425
]
2526
requires = [
2627
"django >= 2.2",
2728
]
2829

2930
[tool.flit.metadata.requires-extra]
3031
facebook = ["facepy"]
32+
33+
[tool.flit.metadata.urls]
34+
Changelog = "https://github.com/caravancoop/rest-framework-auth-toolkit/blob/main/CHANGELOG.md"

tox.ini

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
# quick test with bare "tox" command checks only one combination
3-
envlist = py39-dj31
3+
envlist = py39-dj3.2
44
skip_missing_interpreters = true
55
minversion = 3.4.0
66
isolated_build = True
@@ -9,8 +9,9 @@ isolated_build = True
99
passenv =
1010
DATABASE_URL
1111
deps =
12-
dj22: django == 2.2.*
13-
dj31: django == 3.1.*
12+
dj2.2: django == 2.2.*
13+
dj3.1: django == 3.1.*
14+
dj3.2: django == 3.2.*
1415
commands =
1516
pip install -r requirements-test.txt -r demo/requirements.txt
1617
flake8 rest_auth_toolkit tests demo

0 commit comments

Comments
 (0)