Skip to content

Commit 62b1199

Browse files
committed
Test github actions
1 parent e4ed1f2 commit 62b1199

File tree

4 files changed

+255
-118
lines changed

4 files changed

+255
-118
lines changed

.azure.yml

-8
This file was deleted.

.github/workflows/test.yml

+211
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
name: Run tests
2+
on: [push]
3+
4+
jobs:
5+
docs:
6+
name: ${{ matrix.compose_app }}
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
compose_app:
11+
- flake8
12+
- docs
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@master
16+
- run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django
17+
- run: docker-compose pull --include-deps ${{ matrix.compose_app }} || true
18+
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull ${{ matrix.compose_app }}
19+
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run ${{ matrix.compose_app }}
20+
21+
sqlite:
22+
name: sqlite
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
python_version:
27+
- 3.6
28+
- 3.7
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@master
32+
- run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django
33+
- run: docker-compose pull --include-deps sqlite || true
34+
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull sqlite
35+
env:
36+
PYTHON_VERSION: ${{ matrix.python_version }}
37+
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run sqlite
38+
env:
39+
PYTHON_VERSION: ${{ matrix.python_version }}
40+
41+
sqlite-gis:
42+
name: sqlite-gis
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
python_version:
47+
- 3.6
48+
- 3.7
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@master
52+
- run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django
53+
- run: docker-compose pull --include-deps sqlite-gis || true
54+
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull sqlite-gis
55+
env:
56+
PYTHON_VERSION: ${{ matrix.python_version }}
57+
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run sqlite-gis gis_tests
58+
env:
59+
PYTHON_VERSION: ${{ matrix.python_version }}
60+
61+
postgres:
62+
name: postgres
63+
strategy:
64+
fail-fast: false
65+
matrix:
66+
python_version:
67+
- 3.6
68+
- 3.7
69+
db_version:
70+
- 9.5
71+
- 9.6
72+
- 10
73+
- 11
74+
runs-on: ubuntu-latest
75+
steps:
76+
- uses: actions/checkout@master
77+
- run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django
78+
- run: docker-compose pull --include-deps postgres || true
79+
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull postgres
80+
env:
81+
PYTHON_VERSION: ${{ matrix.python_version }}
82+
POSTGRES_VERSION: ${{ matrix.db_version }}
83+
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run postgres
84+
env:
85+
PYTHON_VERSION: ${{ matrix.python_version }}
86+
POSTGRES_VERSION: ${{ matrix.db_version }}
87+
88+
postgres-gis:
89+
name: postgres-gis
90+
strategy:
91+
fail-fast: false
92+
matrix:
93+
python_version:
94+
- 3.6
95+
- 3.7
96+
db_version:
97+
- 9.5
98+
- 9.6
99+
- 10
100+
- 11
101+
postgis_version:
102+
- 2.4
103+
- 2.5
104+
runs-on: ubuntu-latest
105+
steps:
106+
- uses: actions/checkout@master
107+
- run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django
108+
- run: docker-compose pull --include-deps postgres-gis || true
109+
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull postgres-gis
110+
env:
111+
PYTHON_VERSION: ${{ matrix.python_version }}
112+
POSTGRES_VERSION: ${{ matrix.db_version }}
113+
POSTGIS_VERSION: ${{ matrix.postgis_version }}
114+
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run postgres-gis gis_tests
115+
env:
116+
PYTHON_VERSION: ${{ matrix.python_version }}
117+
POSTGRES_VERSION: ${{ matrix.db_version }}
118+
POSTGIS_VERSION: ${{ matrix.postgis_version }}
119+
120+
mysql:
121+
name: mysql
122+
strategy:
123+
fail-fast: false
124+
matrix:
125+
python_version:
126+
- 3.6
127+
- 3.7
128+
db_version:
129+
- 5.6
130+
- 5.7
131+
- 8.0
132+
runs-on: ubuntu-latest
133+
steps:
134+
- uses: actions/checkout@master
135+
- run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django
136+
- run: docker-compose pull --include-deps mysql || true
137+
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull mysql
138+
env:
139+
PYTHON_VERSION: ${{ matrix.python_version }}
140+
MYSQL_VERSION: ${{ matrix.db_version }}
141+
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run mysql
142+
env:
143+
PYTHON_VERSION: ${{ matrix.python_version }}
144+
MYSQL_VERSION: ${{ matrix.db_version }}
145+
146+
mysql-gis:
147+
name: mysql-gis
148+
strategy:
149+
fail-fast: false
150+
matrix:
151+
python_version:
152+
- 3.6
153+
- 3.7
154+
db_version:
155+
- 5.6
156+
- 5.7
157+
- 8.0
158+
runs-on: ubuntu-latest
159+
steps:
160+
- uses: actions/checkout@master
161+
- run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django
162+
- run: docker-compose pull --include-deps mysql-gis || true
163+
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull mysql-gis
164+
env:
165+
PYTHON_VERSION: ${{ matrix.python_version }}
166+
MYSQL_VERSION: ${{ matrix.db_version }}
167+
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run mysql-gis gis_tests
168+
env:
169+
PYTHON_VERSION: ${{ matrix.python_version }}
170+
MYSQL_VERSION: ${{ matrix.db_version }}
171+
172+
mariadb:
173+
name: mariadb
174+
strategy:
175+
fail-fast: false
176+
matrix:
177+
python_version:
178+
- 3.6
179+
- 3.7
180+
db_version:
181+
- 10.1
182+
- 10.2
183+
- 10.3
184+
- 10.4
185+
runs-on: ubuntu-latest
186+
steps:
187+
- uses: actions/checkout@master
188+
- run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django
189+
- run: docker-compose pull --include-deps mariadb || true
190+
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull mariadb
191+
env:
192+
PYTHON_VERSION: ${{ matrix.python_version }}
193+
MARIADB_VERSION: ${{ matrix.db_version }}
194+
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run mariadb
195+
env:
196+
PYTHON_VERSION: ${{ matrix.python_version }}
197+
MARIADB_VERSION: ${{ matrix.db_version }}
198+
199+
browsers:
200+
name: browsers
201+
runs-on: ubuntu-latest
202+
steps:
203+
- uses: actions/checkout@master
204+
- run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django
205+
- run: docker-compose pull --include-deps chrome || true
206+
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull chrome
207+
env:
208+
PYTHON_VERSION: 3.6
209+
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run chrome
210+
env:
211+
PYTHON_VERSION: 3.6

.travis.yml

-110
This file was deleted.

disabled-.travis.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
sudo: required
2+
dist: trusty
3+
services:
4+
- docker
5+
python: 3.6
6+
language: python
7+
cache: pip
8+
9+
env:
10+
# Browsers:
11+
- COMPOSE_APP=chrome PYTHON_VERSION=3.6
12+
- COMPOSE_APP=firefox PYTHON_VERSION=3.6
13+
14+
matrix:
15+
allow_failures:
16+
- env: COMPOSE_APP=firefox PYTHON_VERSION=3.6
17+
18+
before_install:
19+
- echo 'DOCKER_OPTS="${DOCKER_OPTS} --registry-mirror=https://mirror.gcr.io"' | sudo tee -a /etc/default/docker
20+
- sudo service docker restart
21+
22+
install:
23+
- pip install docker-compose --upgrade
24+
25+
script:
26+
- git clone https://github.com/django/django.git --depth=1 /tmp/django
27+
- export DJANGO_PATH=/tmp/django
28+
- docker-compose pull --include-deps $COMPOSE_APP || true
29+
- docker-compose build --pull $COMPOSE_APP
30+
- |
31+
if [[ $COMPOSE_APP == *-gis ]]; then
32+
docker-compose run $COMPOSE_APP gis_tests
33+
else
34+
docker-compose run $COMPOSE_APP
35+
fi
36+
37+
after_failure:
38+
- docker-compose logs
39+
40+
deploy:
41+
provider: script
42+
script: bash docker_push.sh $COMPOSE_APP
43+
on:
44+
branch: master

0 commit comments

Comments
 (0)