Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Test with github actions #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can update the python versions here to 3.8+

- 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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of ubuntu latest wouldn't it better to use ubuntu LTS like ubuntu 20.04 and in future 22.04 etc

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.8+

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