forked from orf/django-docker-box
-
Notifications
You must be signed in to change notification settings - Fork 37
/
.travis.yml
88 lines (72 loc) · 2.65 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
86
87
88
sudo: required
dist: xenial
services:
- docker
python: 3.10
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.10
- COMPOSE_APP=sqlite-gis PYTHON_VERSION=3.10
- COMPOSE_APP=postgres PYTHON_VERSION=3.10 POSTGRES_VERSION=13
- COMPOSE_APP=postgres-gis PYTHON_VERSION=3.10 POSTGRES_VERSION=13 POSTGIS_VERSION=3.0
- COMPOSE_APP=mysql PYTHON_VERSION=3.10 MYSQL_VERSION=8
- COMPOSE_APP=mysql-gis PYTHON_VERSION=3.10 MYSQL_VERSION=8
- COMPOSE_APP=mariadb PYTHON_VERSION=3.10 MARIADB_VERSION=10.5
# Sqlite
- COMPOSE_APP=sqlite PYTHON_VERSION=3.10
# Sqlite gis:
- COMPOSE_APP=sqlite-gis PYTHON_VERSION=3.10
# Postgres:
- COMPOSE_APP=postgres PYTHON_VERSION=3.10 POSTGRES_VERSION=13
- COMPOSE_APP=postgres PYTHON_VERSION=3.10 POSTGRES_VERSION=14
- COMPOSE_APP=postgres PYTHON_VERSION=3.10 POSTGRES_VERSION=15
- COMPOSE_APP=postgres PYTHON_VERSION=3.10 POSTGRES_VERSION=16
# Postgres gis:
- COMPOSE_APP=postgres-gis PYTHON_VERSION=3.10 POSTGRES_VERSION=13 POSTGIS_VERSION=3.0
- COMPOSE_APP=postgres-gis PYTHON_VERSION=3.10 POSTGRES_VERSION=14 POSTGIS_VERSION=3.1
- COMPOSE_APP=postgres-gis PYTHON_VERSION=3.10 POSTGRES_VERSION=15 POSTGIS_VERSION=3.3
- COMPOSE_APP=postgres-gis PYTHON_VERSION=3.10 POSTGRES_VERSION=16 POSTGIS_VERSION=3.4
# MySQL:
- COMPOSE_APP=mysql PYTHON_VERSION=3.10 MYSQL_VERSION=8.0
# MySQL gis:
- COMPOSE_APP=mysql-gis PYTHON_VERSION=3.10 MYSQL_VERSION=8.0
# MariaDB:
- COMPOSE_APP=mariadb PYTHON_VERSION=3.10 MARIADB_VERSION=10.5
- COMPOSE_APP=mariadb PYTHON_VERSION=3.10 MARIADB_VERSION=10.6
- COMPOSE_APP=mariadb PYTHON_VERSION=3.10 MARIADB_VERSION=10.11
- COMPOSE_APP=mariadb PYTHON_VERSION=3.10 MARIADB_VERSION=11.0
- COMPOSE_APP=mariadb PYTHON_VERSION=3.10 MARIADB_VERSION=11.1
# Browsers:
- COMPOSE_APP=chrome PYTHON_VERSION=3.10
- COMPOSE_APP=firefox PYTHON_VERSION=3.10
matrix:
allow_failures:
- env: COMPOSE_APP=firefox PYTHON_VERSION=3.10
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