diff --git a/.azure.yml b/.azure.yml deleted file mode 100644 index b82fd74..0000000 --- a/.azure.yml +++ /dev/null @@ -1,8 +0,0 @@ -pool: - vmImage: 'vs2017-win2016' - -steps: -- script: | - docker pull microsoft/windowsservercore - docker-compose --version - displayName: Test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..4287993 --- /dev/null +++ b/.github/workflows/test.yml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ea1e0c9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,110 +0,0 @@ -sudo: required -dist: trusty -services: -- docker -python: 3.6 -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.6 -- COMPOSE_APP=sqlite-gis PYTHON_VERSION=3.6 -- COMPOSE_APP=postgres PYTHON_VERSION=3.6 POSTGRES_VERSION=9.5 -- COMPOSE_APP=postgres-gis PYTHON_VERSION=3.6 POSTGRES_VERSION=9.5 POSTGIS_VERSION=2.4 -- COMPOSE_APP=mysql PYTHON_VERSION=3.6 MYSQL_VERSION=5.6 -- COMPOSE_APP=mysql-gis PYTHON_VERSION=3.6 MYSQL_VERSION=5.6 -- COMPOSE_APP=mariadb PYTHON_VERSION=3.6 MARIADB_VERSION=10.1 - -# Sqlite -- COMPOSE_APP=sqlite PYTHON_VERSION=3.7 - -# Sqlite gis: -- COMPOSE_APP=sqlite-gis PYTHON_VERSION=3.7 - -# Postgres: -- COMPOSE_APP=postgres PYTHON_VERSION=3.6 POSTGRES_VERSION=9.5 -- COMPOSE_APP=postgres PYTHON_VERSION=3.6 POSTGRES_VERSION=9.6 -- COMPOSE_APP=postgres PYTHON_VERSION=3.6 POSTGRES_VERSION=10 -- COMPOSE_APP=postgres PYTHON_VERSION=3.6 POSTGRES_VERSION=11 - -- COMPOSE_APP=postgres PYTHON_VERSION=3.7 POSTGRES_VERSION=9.5 -- COMPOSE_APP=postgres PYTHON_VERSION=3.7 POSTGRES_VERSION=9.6 -- COMPOSE_APP=postgres PYTHON_VERSION=3.7 POSTGRES_VERSION=10 -- COMPOSE_APP=postgres PYTHON_VERSION=3.7 POSTGRES_VERSION=11 - -# Postgres gis: -- COMPOSE_APP=postgres-gis PYTHON_VERSION=3.6 POSTGRES_VERSION=9.6 POSTGIS_VERSION=2.4 -- COMPOSE_APP=postgres-gis PYTHON_VERSION=3.6 POSTGRES_VERSION=10 POSTGIS_VERSION=2.4 -- COMPOSE_APP=postgres-gis PYTHON_VERSION=3.6 POSTGRES_VERSION=11 POSTGIS_VERSION=2.5 - -- COMPOSE_APP=postgres-gis PYTHON_VERSION=3.7 POSTGRES_VERSION=9.5 POSTGIS_VERSION=2.4 -- COMPOSE_APP=postgres-gis PYTHON_VERSION=3.7 POSTGRES_VERSION=9.6 POSTGIS_VERSION=2.4 -- COMPOSE_APP=postgres-gis PYTHON_VERSION=3.7 POSTGRES_VERSION=10 POSTGIS_VERSION=2.4 -- COMPOSE_APP=postgres-gis PYTHON_VERSION=3.7 POSTGRES_VERSION=11 POSTGIS_VERSION=2.5 - -# MySQL: -- COMPOSE_APP=mysql PYTHON_VERSION=3.6 MYSQL_VERSION=5.7 -- COMPOSE_APP=mysql PYTHON_VERSION=3.6 MYSQL_VERSION=8.0 - -- COMPOSE_APP=mysql PYTHON_VERSION=3.7 MYSQL_VERSION=5.6 -- COMPOSE_APP=mysql PYTHON_VERSION=3.7 MYSQL_VERSION=5.7 -- COMPOSE_APP=mysql PYTHON_VERSION=3.7 MYSQL_VERSION=8.0 - -# MySQL gis: -- COMPOSE_APP=mysql-gis PYTHON_VERSION=3.6 MYSQL_VERSION=5.7 -- COMPOSE_APP=mysql-gis PYTHON_VERSION=3.6 MYSQL_VERSION=8.0 - -- COMPOSE_APP=mysql-gis PYTHON_VERSION=3.7 MYSQL_VERSION=5.6 -- COMPOSE_APP=mysql-gis PYTHON_VERSION=3.7 MYSQL_VERSION=5.7 -- COMPOSE_APP=mysql-gis PYTHON_VERSION=3.7 MYSQL_VERSION=8.0 - -# MariaDB: -- COMPOSE_APP=mariadb PYTHON_VERSION=3.6 MARIADB_VERSION=10.2 -- COMPOSE_APP=mariadb PYTHON_VERSION=3.6 MARIADB_VERSION=10.3 -- COMPOSE_APP=mariadb PYTHON_VERSION=3.6 MARIADB_VERSION=10.4 - -- COMPOSE_APP=mariadb PYTHON_VERSION=3.7 MARIADB_VERSION=10.1 -- COMPOSE_APP=mariadb PYTHON_VERSION=3.7 MARIADB_VERSION=10.2 -- COMPOSE_APP=mariadb PYTHON_VERSION=3.7 MARIADB_VERSION=10.3 -- COMPOSE_APP=mariadb PYTHON_VERSION=3.7 MARIADB_VERSION=10.4 - -# 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 diff --git a/disabled-.travis.yml b/disabled-.travis.yml new file mode 100644 index 0000000..39c6402 --- /dev/null +++ b/disabled-.travis.yml @@ -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