1
- name : Flake8
1
+ name : CI
2
2
3
3
on : [push, pull_request]
4
4
@@ -7,6 +7,87 @@ concurrency:
7
7
cancel-in-progress : true
8
8
9
9
jobs :
10
+ test :
11
+ runs-on : ubuntu-latest
12
+
13
+ services :
14
+ postgres :
15
+ image : postgres:13
16
+ ports :
17
+ - 5432:5432
18
+ env :
19
+ POSTGRES_DB : pguser
20
+ POSTGRES_USER : pguser
21
+ POSTGRES_PASSWORD : foobar
22
+ options : >-
23
+ --health-cmd "pg_isready -U pguser"
24
+ --health-interval 10s
25
+ --health-timeout 5s
26
+ --health-retries 5
27
+
28
+ redis :
29
+ image : redis:latest
30
+ ports :
31
+ - 6379:6379
32
+ options : >-
33
+ --health-cmd "redis-cli ping"
34
+ --health-interval 10s
35
+ --health-timeout 5s
36
+ --health-retries 5
37
+
38
+ strategy :
39
+ fail-fast : false
40
+ matrix :
41
+ python-version : ["3.8", "3.9", "3.10", "3.11", "3.12"]
42
+ django-version : ["3.2", "4.0", "4.1", "4.2", "5.0", "5.1"]
43
+ exclude :
44
+ - python-version : " 3.8"
45
+ django-version : " 5.0"
46
+ - python-version : " 3.8"
47
+ django-version : " 5.1"
48
+
49
+ - python-version : " 3.9"
50
+ django-version : " 5.0"
51
+ - python-version : " 3.9"
52
+ django-version : " 5.1"
53
+
54
+ - python-version : " 3.11"
55
+ django-version : " 3.2"
56
+
57
+ - python-version : " 3.12"
58
+ django-version : " 3.2"
59
+ - python-version : " 3.12"
60
+ django-version : " 4.0"
61
+
62
+ steps :
63
+ - uses : actions/checkout@v2
64
+
65
+ - name : Set up Python ${{ matrix.python-version }}
66
+ uses : actions/setup-python@v2
67
+ with :
68
+ python-version : ${{ matrix.python-version }}
69
+
70
+ - name : Install dependencies
71
+ run : |
72
+ python -m pip install --upgrade pip
73
+ pip install tox tox-gh-actions
74
+
75
+ - name : Run Tox
76
+ env :
77
+ DJANGO_VERSION : ${{ matrix.django-version }}
78
+ run : |
79
+ PYTHON_VERSION=`echo ${{ matrix.python-version }} | sed 's/\.//'`
80
+ DJANGO_VERSION=`echo $DJANGO_VERSION | sed 's/\.//'`
81
+ tox -e py${PYTHON_VERSION}-django${DJANGO_VERSION}
82
+
83
+ # TODO: activate when organization token will be available
84
+ # - name: Upload coverage to Codecov
85
+ # uses: codecov/codecov-action@v4
86
+ # with:
87
+ # token: ${{ secrets.CODECOV_TOKEN }}
88
+ # files: coverage.xml
89
+ # fail_ci_if_error: true
90
+
10
91
flake8 :
11
92
name : flake8
12
93
runs-on : ubuntu-latest
0 commit comments