Browse Source

Add databases to the testing matrix

pull/453/head
Pēteris Caune 4 years ago
parent
commit
3806934548
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
1 changed files with 11 additions and 7 deletions
  1. +11
    -7
      .github/workflows/django.yml

+ 11
- 7
.github/workflows/django.yml View File

@ -13,26 +13,29 @@ jobs:
strategy: strategy:
max-parallel: 4 max-parallel: 4
matrix: matrix:
db: [sqlite, postgres, mysql]
python-version: [3.6, 3.7, 3.8] python-version: [3.6, 3.7, 3.8]
services: services:
postgres: postgres:
image: postgres:10 image: postgres:10
env: env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: hc
POSTGRES_PASSWORD: hunter2
options: >- options: >-
--health-cmd pg_isready --health-cmd pg_isready
--health-interval 10s --health-interval 10s
--health-timeout 5s --health-timeout 5s
--health-retries 5 --health-retries 5
ports: ports:
- 5432:5432
- 5432:2020
mysql: mysql:
image: mysql:5.7 image: mysql:5.7
env: env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_USER: hc
MYSQL_PASSWORD: hunter2
ports: ports:
- 3306:3306
- 3306:2020
options: >- options: >-
--health-cmd="mysqladmin ping" --health-cmd="mysqladmin ping"
--health-interval=10s --health-interval=10s
@ -52,9 +55,10 @@ jobs:
pip install braintree mysqlclient apprise pip install braintree mysqlclient apprise
- name: Run Tests - name: Run Tests
env: env:
DB: mysql
DB: ${{ matrix.db }}
DB_HOST: 127.0.0.1 DB_HOST: 127.0.0.1
DB_PORT: 3306
DB_USER: root
DB_PORT: 2020
DB_USER: hc
DB_PASSWORD: hunter2
run: | run: |
python manage.py test python manage.py test

Loading…
Cancel
Save