Skip to content

Commit

Permalink
Test github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
orf committed Sep 19, 2019
1 parent e4ed1f2 commit cbabc20
Show file tree
Hide file tree
Showing 4 changed files with 255 additions and 118 deletions.
8 changes: 0 additions & 8 deletions .azure.yml

This file was deleted.

211 changes: 211 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
name: Run tests
on: [push]

jobs:
docs:
name: ${{ matrix.compose_app }}
strategy:
fail-fast: false
matrix:
compose_app:
- flake8
- docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django
- run: docker-compose pull --include-deps ${{ matrix.compose_app }} || true
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull ${{ matrix.compose_app }}
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run ${{ matrix.compose_app }}

sqlite:
name: sqlite
strategy:
fail-fast: false
matrix:
python_version:
- 3.6
- 3.7
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django
- run: docker-compose pull --include-deps sqlite || true
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull sqlite
env:
PYTHON_VERSION: ${{ matrix.python_version }}
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run sqlite
env:
PYTHON_VERSION: ${{ matrix.python_version }}

sqlite-gis:
name: sqlite-gis
strategy:
fail-fast: false
matrix:
python_version:
- 3.6
- 3.7
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django
- run: docker-compose pull --include-deps sqlite-gis || true
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull sqlite-gis
env:
PYTHON_VERSION: ${{ matrix.python_version }}
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run sqlite-gis gis_tests
env:
PYTHON_VERSION: ${{ matrix.python_version }}

postgres:
name: postgres
strategy:
fail-fast: false
matrix:
python_version:
- 3.6
- 3.7
db_version:
- 9.5
- 9.6
- 10
- 11
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django
- run: docker-compose pull --include-deps postgres || true
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull postgres
env:
PYTHON_VERSION: ${{ matrix.python_version }}
POSTGRES_VERSION: ${{ matrix.db_version }}
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run postgres
env:
PYTHON_VERSION: ${{ matrix.python_version }}
POSTGRES_VERSION: ${{ matrix.db_version }}

postgres-gis:
name: postgres-gis
strategy:
fail-fast: false
matrix:
python_version:
- 3.6
- 3.7
db_version:
- 9.5
- 9.6
- 10
- 11
postgis_version:
- 2.4
- 2.5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django
- run: docker-compose pull --include-deps postgres-gis || true
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull postgres-gis
env:
PYTHON_VERSION: ${{ matrix.python_version }}
POSTGRES_VERSION: ${{ matrix.db_version }}
POSTGIS_VERSION: ${{ matrix.postgis_version }}
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run postgres-gis gis_tests
env:
PYTHON_VERSION: ${{ matrix.python_version }}
POSTGRES_VERSION: ${{ matrix.db_version }}
POSTGIS_VERSION: ${{ matrix.postgis_version }}

mysql:
name: mysql
strategy:
fail-fast: false
matrix:
python_version:
- 3.6
- 3.7
db_version:
- 5.6
- 5.7
- 8.0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django
- run: docker-compose pull --include-deps mysql || true
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull mysql
env:
PYTHON_VERSION: ${{ matrix.python_version }}
MYSQL_VERSION: ${{ matrix.db_version }}
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run mysql
env:
PYTHON_VERSION: ${{ matrix.python_version }}
MYSQL_VERSION: ${{ matrix.db_version }}

mysql-gis:
name: mysql-gis
strategy:
fail-fast: false
matrix:
python_version:
- 3.6
- 3.7
db_version:
- 5.6
- 5.7
- 8.0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django
- run: docker-compose pull --include-deps mysql-gis || true
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull mysql-gis
env:
PYTHON_VERSION: ${{ matrix.python_version }}
MYSQL_VERSION: ${{ matrix.db_version }}
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run mysql-gis gis_tests
env:
PYTHON_VERSION: ${{ matrix.python_version }}
MYSQL_VERSION: ${{ matrix.db_version }}

mariadb:
name: mariadb
strategy:
fail-fast: false
matrix:
python_version:
- 3.6
- 3.7
db_version:
- 10.1
- 10.2
- 10.3
- 10.4
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django
- run: docker-compose pull --include-deps mariadb || true
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull mariadb
env:
PYTHON_VERSION: ${{ matrix.python_version }}
MARIADB_VERSION: ${{ matrix.db_version }}
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run mariadb
env:
PYTHON_VERSION: ${{ matrix.python_version }}
MARIADB_VERSION: ${{ matrix.db_version }}

browsers:
name: browsers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: git clone https://github.com/django/django.git --depth=1 ${GITHUB_WORKSPACE}/django
- run: docker-compose pull --include-deps chrome || true
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose build --pull chrome
env:
PYTHON_VERSION: 3.6
- run: DJANGO_PATH=${GITHUB_WORKSPACE}/django docker-compose run chrome
env:
PYTHON_VERSION: 3.6
110 changes: 0 additions & 110 deletions .travis.yml

This file was deleted.

44 changes: 44 additions & 0 deletions disabled-.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
sudo: required
dist: trusty
services:
- docker
python: 3.6
language: python
cache: pip

env:
# Browsers:
- COMPOSE_APP=chrome PYTHON_VERSION=3.6
- COMPOSE_APP=firefox PYTHON_VERSION=3.6

matrix:
allow_failures:
- env: COMPOSE_APP=firefox PYTHON_VERSION=3.6

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: master

0 comments on commit cbabc20

Please sign in to comment.