forked from django/django-docker-box
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
85 lines (69 loc) · 2.39 KB
/
.travis.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
sudo: required
dist: xenial
services:
- docker
python: 3.8
language: python
cache: pip
env:
# Linting and docs
- COMPOSE_APP=flake8
- COMPOSE_APP=docs
# Quick Runs. Lowest supported database and Python version.
- COMPOSE_APP=sqlite PYTHON_VERSION=3.8
- COMPOSE_APP=sqlite-gis PYTHON_VERSION=3.8
- COMPOSE_APP=postgres PYTHON_VERSION=3.8 POSTGRES_VERSION=10
- COMPOSE_APP=postgres-gis PYTHON_VERSION=3.8 POSTGRES_VERSION=10 POSTGIS_VERSION=2.4
- COMPOSE_APP=mysql PYTHON_VERSION=3.8 MYSQL_VERSION=5.7
- COMPOSE_APP=mysql-gis PYTHON_VERSION=3.8 MYSQL_VERSION=5.7
- COMPOSE_APP=mariadb PYTHON_VERSION=3.8 MARIADB_VERSION=10.2
# Sqlite
- COMPOSE_APP=sqlite PYTHON_VERSION=3.8
# Sqlite gis:
- COMPOSE_APP=sqlite-gis PYTHON_VERSION=3.8
# Postgres:
- COMPOSE_APP=postgres PYTHON_VERSION=3.8 POSTGRES_VERSION=10
- COMPOSE_APP=postgres PYTHON_VERSION=3.8 POSTGRES_VERSION=11
# Postgres gis:
- COMPOSE_APP=postgres-gis PYTHON_VERSION=3.8 POSTGRES_VERSION=10 POSTGIS_VERSION=2.4
- COMPOSE_APP=postgres-gis PYTHON_VERSION=3.8 POSTGRES_VERSION=11 POSTGIS_VERSION=2.5
# MySQL:
- COMPOSE_APP=mysql PYTHON_VERSION=3.8 MYSQL_VERSION=5.7
- COMPOSE_APP=mysql PYTHON_VERSION=3.8 MYSQL_VERSION=8.0
# MySQL gis:
- COMPOSE_APP=mysql-gis PYTHON_VERSION=3.8 MYSQL_VERSION=5.7
- COMPOSE_APP=mysql-gis PYTHON_VERSION=3.8 MYSQL_VERSION=8.0
# MariaDB:
- COMPOSE_APP=mariadb PYTHON_VERSION=3.8 MARIADB_VERSION=10.2
- COMPOSE_APP=mariadb PYTHON_VERSION=3.8 MARIADB_VERSION=10.3
- COMPOSE_APP=mariadb PYTHON_VERSION=3.8 MARIADB_VERSION=10.4
- COMPOSE_APP=mariadb PYTHON_VERSION=3.8 MARIADB_VERSION=10.5
# Browsers:
- COMPOSE_APP=chrome PYTHON_VERSION=3.8
- COMPOSE_APP=firefox PYTHON_VERSION=3.8
matrix:
allow_failures:
- env: COMPOSE_APP=firefox PYTHON_VERSION=3.8
before_install:
- echo 'DOCKER_OPTS="${DOCKER_OPTS} --registry-mirror=https://mirror.gcr.io"' | sudo tee -a /etc/default/docker
- sudo service docker restart
install:
- pip install docker-compose --upgrade
script:
- git clone https://github.com/django/django.git --depth=1 /tmp/django
- export DJANGO_PATH=/tmp/django
- docker-compose pull --include-deps $COMPOSE_APP || true
- docker-compose build --pull $COMPOSE_APP
- |
if [[ $COMPOSE_APP == *-gis ]]; then
docker-compose run $COMPOSE_APP gis_tests
else
docker-compose run $COMPOSE_APP
fi
after_failure:
- docker-compose logs
deploy:
provider: script
script: bash docker_push.sh $COMPOSE_APP
on:
branch: main