Skip to content

[update] workflow.yml #41

[update] workflow.yml

[update] workflow.yml #41

Workflow file for this run

name: Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
mysql:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
max-parallel: 5
matrix:
python-version: [3.7, 3.8]
django-version: [2.2.27, 3.2.12, 4.0.2]
exclude:
- python-version: 3.7
django-version: 4.0.2
services:
mysql:
image: mysql
ports:
- 3306:3306
env:
MYSQL_PASSWORD: mysql
MYSQL_USER: mysql
MYSQL_ROOT_PASSWORD: mysql
MYSQL_DATABASE: mysql
MYSQL_HOST: 127.0.0.1
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=5
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install python-dateutil
pip install mysqlclient
pip install sqlparse
pip install -q Django==${{ matrix.django-version }}
- name: Run Tests
run: |
python runtests.py --settings=django_datetime_expressions.tests.test_mysql_settings
postgres:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
max-parallel: 5
matrix:
python-version: [3.7, 3.8]
django-version: [2.2.27, 3.2.12, 4.0.2]
exclude:
- python-version: 3.7
django-version: 4.0.2
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install python-dateutil
pip install psycopg2
pip install sqlparse
pip install -q Django==${{ matrix.django-version }}
- name: Run Tests
run: |
python runtests.py --settings=django_datetime_expressions.tests.test_postgres_settings
sqlite:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
max-parallel: 5
matrix:
python-version: [3.7, 3.8]
django-version: [2.2.27, 3.2.12, 4.0.2]
exclude:
- python-version: 3.7
django-version: 4.0.2
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install python-dateutil
pip install sqlparse
pip install -q Django==${{ matrix.django-version }}
- name: Run Tests
run: |
python runtests.py --settings=django_datetime_expressions.tests.test_sqlite_settings