-
Notifications
You must be signed in to change notification settings - Fork 37
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 3.8+ |
This file was deleted.
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 |
There was a problem hiding this comment.
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+