Skip to content

Commit 977f917

Browse files
authored
Ci update (#632)
* update ci * update tox * update github actons * update ubuntu os * update python versions * update env * update env * update * downgrade to v3
1 parent 3c56b21 commit 977f917

File tree

4 files changed

+56
-37
lines changed

4 files changed

+56
-37
lines changed

.github/workflows/ci.yml

Lines changed: 50 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,50 @@
1-
- name: Setup Python
2-
uses: actions/[email protected]
3-
with:
4-
# Version range or exact version of Python or PyPy to use, using SemVer's version range syntax. Reads from .python-version if unset.
5-
python-version: # optional
6-
# File containing the Python version to use. Example: .python-version
7-
python-version-file: # optional
8-
# Used to specify a package manager for caching in the default directory. Supported values: pip, pipenv, poetry.
9-
cache: # optional
10-
# The target architecture (x86, x64, arm64) of the Python or PyPy interpreter.
11-
architecture: # optional
12-
# Set this option if you want the action to check for the latest available version that satisfies the version spec.
13-
check-latest: # optional
14-
# The token used to authenticate when fetching Python distributions from https://github.com/actions/python-versions. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
15-
token: # optional, default is ${{ github.server_url == 'https://github.com' && github.token || '' }}
16-
# Used to specify the path to dependency files. Supports wildcards or a list of file names for caching multiple dependencies.
17-
cache-dependency-path: # optional
18-
# Set this option if you want the action to update environment variables.
19-
update-environment: # optional, default is true
20-
# When 'true', a version range passed to 'python-version' input will match prerelease versions if no GA versions are found. Only 'x.y' version range is supported for CPython.
21-
allow-prereleases: # optional
22-
# When 'true', use the freethreaded version of Python.
23-
freethreaded: # optional
24-
1+
name: CI Test
2+
3+
on:
4+
pull_request:
5+
branches: [ "master" ]
6+
7+
push:
8+
branches: [ "master" ]
9+
10+
jobs:
11+
matrix:
12+
name: Unittest Matrix
13+
runs-on: ubuntu-22.04
14+
strategy:
15+
matrix:
16+
python-version: ["3.7","3.8","3.9"]
17+
django: [ "11", "22",]
18+
exclude:
19+
- python-version: "3.8"
20+
django: "11"
21+
22+
- python-version: "3.9"
23+
django: "11"
24+
25+
26+
services:
27+
postgres:
28+
image: postgres
29+
# Set health checks to wait until postgres has started
30+
options: >-
31+
--health-cmd pg_isready
32+
--health-interval 10s
33+
--health-timeout 5s
34+
--health-retries 5
35+
ports:
36+
# Maps tcp port 5432 on service container to the host
37+
- 5432:5432
38+
env:
39+
# Docker image requires a password to be set
40+
POSTGRES_PASSWORD: "postgres"
41+
42+
steps:
43+
- uses: actions/checkout@v3
44+
- uses: actions/setup-python@v3
45+
with:
46+
python-version: ${{ matrix.python-version }}
47+
- run: pip install tox
48+
- run: tox -v -- -v
49+
env:
50+
TOXENV: py${{ matrix.python-version }}-django${{ matrix.django }}

requirements/default.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
celery>=3.1.15,<4.4.7
1+
celery>=3.1.15,<4.5

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def extra_args(self):
181181
package_data=package_data,
182182
zip_safe=False,
183183
install_requires=[
184-
'celery>=3.1.15,<4.0',
184+
'celery>=3.1.15,<4.5',
185185
'django>=1.8',
186186
],
187187
cmdclass={'test': RunTests,
@@ -205,7 +205,6 @@ def extra_args(self):
205205
'Programming Language :: Python :: 3.5',
206206
'Programming Language :: Python :: Implementation :: CPython',
207207
'Programming Language :: Python :: Implementation :: PyPy',
208-
'Programming Language :: Python :: Implementation :: Jython',
209208
],
210209
long_description=long_description,
211210
**extra

tox.ini

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
11
[tox]
2-
envlist = py27-django{1.8,1.9,1.10}, py35-django{1.8,1.9,1.10}, flake8
2+
envlist = py37-django{1.11,2.2}, py38-django{2.2}, py39-django{2.2}
33

44
[testenv]
55
sitepackages = False
66
deps =
77
-r{toxinidir}/requirements/default.txt
88
-r{toxinidir}/requirements/test.txt
9-
django1.8: Django>=1.8.0,<1.9.0
10-
django1.9: Django>=1.9.0,<1.10.0
11-
django1.10: Django>=1.10.0,<1.11.0
9+
10+
django1.11: Django>=1.11.17,<2.0
11+
django2.2: Django>=2.2.17,<3.0
1212

1313
setenv =
1414
PYTHONPATH={toxinidir}/tests
1515
DJANGO_SETTINGS_MODULE=settings
1616
commands =
1717
{envpython} -Wall tests/manage.py test {posargs}
1818

19-
[testenv:flake8]
20-
basepython = python2.7
21-
deps =
22-
flake8
23-
commands =
24-
flake8 djcelery

0 commit comments

Comments
 (0)