mirror of
https://github.com/Hopiu/django-fobi.git
synced 2026-03-16 22:10:28 +00:00
118 lines
3.5 KiB
YAML
118 lines
3.5 KiB
YAML
name: test
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
test:
|
|
# Service containers to run with `container-job`
|
|
services:
|
|
# Label used to access the service container
|
|
postgres:
|
|
# Docker Hub image
|
|
image: postgres
|
|
# Provide the password for postgres
|
|
env:
|
|
POSTGRES_PASSWORD: test
|
|
# Set health checks to wait until postgres has started
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
max-parallel: 4
|
|
matrix:
|
|
include:
|
|
- python-version: 3.6
|
|
requirements: django_2_2
|
|
tox_env: py36-django22
|
|
- python-version: 3.7
|
|
requirements: django_2_2
|
|
tox_env: py37-django22
|
|
- python-version: 3.8
|
|
requirements: django_2_2
|
|
tox_env: py38-django22
|
|
- python-version: 3.9
|
|
requirements: django_2_2
|
|
tox_env: py39-django22
|
|
|
|
- python-version: 3.6
|
|
requirements: django_3_0
|
|
tox_env: py36-django30
|
|
- python-version: 3.7
|
|
requirements: django_3_0
|
|
tox_env: py37-django30
|
|
- python-version: 3.8
|
|
requirements: django_3_0
|
|
tox_env: py38-django30
|
|
- python-version: 3.9
|
|
requirements: django_3_0
|
|
tox_env: py39-django30
|
|
|
|
- python-version: 3.6
|
|
requirements: django_3_1
|
|
tox_env: py36-django31
|
|
- python-version: 3.7
|
|
requirements: django_3_1
|
|
tox_env: py37-django31
|
|
- python-version: 3.8
|
|
requirements: django_3_1
|
|
tox_env: py38-django31
|
|
- python-version: 3.9
|
|
requirements: django_3_1
|
|
tox_env: py39-django31
|
|
|
|
- python-version: 3.6
|
|
requirements: django_3_2
|
|
tox_env: py36-django32
|
|
- python-version: 3.7
|
|
requirements: django_3_2
|
|
tox_env: py37-django32
|
|
- python-version: 3.8
|
|
requirements: django_3_2
|
|
tox_env: py38-django32
|
|
- python-version: 3.9
|
|
requirements: django_3_2
|
|
tox_env: py39-django32
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- uses: nanasess/setup-chromedriver@master
|
|
with:
|
|
# Optional: do not specify to match Chrome's version
|
|
chromedriver-version: '88.0.4324.96'
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install pip-tools
|
|
pip-compile examples/requirements/${{ matrix.requirements }}.in
|
|
pip install -r examples/requirements/${{ matrix.requirements }}.txt
|
|
pip-compile examples/requirements/test.in
|
|
pip install -r examples/requirements/test.txt
|
|
- name: Run Tests
|
|
run: tox -e ${{ matrix.tox_env }}
|
|
- name: Coveralls
|
|
uses: AndreMiras/coveralls-python-action@develop
|
|
with:
|
|
parallel: true
|
|
flag-name: Run Tests
|
|
|
|
coveralls_finish:
|
|
needs: test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Coveralls Finished
|
|
env:
|
|
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
|
uses: AndreMiras/coveralls-python-action@develop
|
|
with:
|
|
parallel-finished: true
|
|
debug: True
|