-
Notifications
You must be signed in to change notification settings - Fork 31
172 lines (167 loc) · 5.27 KB
/
python-package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
name: python package
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
django: [
"django>=2.0,<2.1",
"django>=2.1,<2.2",
"django>=2.2,<3.0",
"django>=3.0,<3.1",
"django>=3.1,<3.2",
"django>=3.2,<4.0",
"django>=4.0,<4.1",
"django>=4.1,<4.2",
"django>=4.2,<5.0",
]
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
exclude:
# django 2.0
- django: "django>=2.0,<2.1"
python: "3.8"
- django: "django>=2.0,<2.1"
python: "3.9"
- django: "django>=2.0,<2.1"
python: "3.10"
- django: "django>=2.0,<2.1"
python: "3.11"
- django: "django>=2.0,<2.1"
python: "3.12"
# django 2.1
- django: "django>=2.1,<2.2"
python: "3.4"
- django: "django>=2.1,<2.2"
python: "3.8"
- django: "django>=2.1,<2.2"
python: "3.9"
- django: "django>=2.1,<2.2"
python: "3.10"
- django: "django>=2.1,<2.2"
python: "3.11"
- django: "django>=2.1,<2.2"
python: "3.12"
# django 2.2
- django: "django>=2.2,<3.0"
python: "3.4"
- django: "django>=2.2,<3.0"
python: "3.10"
- django: "django>=2.2,<3.0"
python: "3.11"
- django: "django>=2.2,<3.0"
python: "3.12"
# django 3.0
- django: "django>=3.0,<3.1"
python: "3.4"
- django: "django>=3.0,<3.1"
python: "3.5"
- django: "django>=3.0,<3.1"
python: "3.10"
- django: "django>=3.0,<3.1"
python: "3.11"
- django: "django>=3.0,<3.1"
python: "3.12"
# django 3.1
- django: "django>=3.1,<3.2"
python: "3.4"
- django: "django>=3.1,<3.2"
python: "3.5"
- django: "django>=3.1,<3.2"
python: "3.10"
- django: "django>=3.1,<3.2"
python: "3.11"
- django: "django>=3.1,<3.2"
python: "3.12"
# django 3.2
- django: "django>=3.2,<4.0"
python: "3.4"
- django: "django>=3.2,<4.0"
python: "3.5"
- django: "django>=3.2,<4.0"
python: "3.11"
- django: "django>=3.2,<4.0"
python: "3.12"
# django 4.0
- django: "django>=4.0,<4.1"
python: "3.4"
- django: "django>=4.0,<4.1"
python: "3.5"
- django: "django>=4.0,<4.1"
python: "3.6"
- django: "django>=4.0,<4.1"
python: "3.7"
- django: "django>=4.0,<4.1"
python: "3.11"
- django: "django>=4.0,<4.1"
python: "3.12"
# django 4.1
- django: "django>=4.1,<4.2"
python: "3.4"
- django: "django>=4.1,<4.2"
python: "3.5"
- django: "django>=4.1,<4.2"
python: "3.6"
- django: "django>=4.1,<4.2"
python: "3.7"
- django: "django>=4.1,<4.2"
python: "3.12"
# django 4.2
- django: "django>=4.2,<5.0"
python: "3.4"
- django: "django>=4.2,<5.0"
python: "3.5"
- django: "django>=4.2,<5.0"
python: "3.6"
- django: "django>=4.2,<5.0"
python: "3.7"
steps:
- uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: install pytest, pytest-django and pytest-lazy-fixture, django and impostor
run: |
pip install pytest==7.4.3 pytest-django==4.5.0 pytest-lazy-fixture==0.6.3
pip install "${{ matrix.django }}"
pip install -e .
- name: run tests
run: pytest -v tests/
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
- name: install tox and any other packages
run: |
pip install flake8
- name: lint with flake8
run: |
# stop the build if there are python syntax errors or undefined names
flake8 . --count --select=e9,f63,f7,f82 --show-source --statistics
# exit-zero treats all errors as warnings. the github editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: install coverage
run: |
pip install django pytest==7.4.3 pytest-django==4.7.0 pytest-lazy-fixture==0.6.3 pytest-cov==4.1.0
pip install -e .
- name: execute coverage
run: |
# execute tests with coverage
pytest --cov-report=xml --cov=impostor tests/
export codecov_token="${{ secrets.codecov_token }}"
bash <(curl -s https://codecov.io/bash)