Skip to content

Commit 3b2783e

Browse files
committed
update github actons
1 parent 845e43f commit 3b2783e

File tree

1 file changed

+50
-24
lines changed

1 file changed

+50
-24
lines changed

.github/workflows/ci.yml

+50-24
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-20.04
14+
strategy:
15+
matrix:
16+
python-version: ["3.5", "3.6", "3.7","3.8"]
17+
django: [ "11", "22",]
18+
exclude:
19+
- python-version: "3.8"
20+
django: "11"
21+
22+
- python-version: "3.8"
23+
django: "22"
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@v4
45+
with:
46+
python-version: ${{ matrix.python-version }}
47+
- run: pip install tox
48+
- run: tox -v -- -v
49+
env:
50+
TOXENV: py-django${{ matrix.django }}

0 commit comments

Comments
 (0)