From 380693454816d227f9506622bcb60924511f1d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Fri, 20 Nov 2020 11:29:25 +0200 Subject: [PATCH] Add databases to the testing matrix --- .github/workflows/django.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 54f55ef9..a096a1eb 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -13,26 +13,29 @@ jobs: strategy: max-parallel: 4 matrix: + db: [sqlite, postgres, mysql] python-version: [3.6, 3.7, 3.8] services: postgres: image: postgres:10 env: - POSTGRES_PASSWORD: postgres + POSTGRES_USER: hc + POSTGRES_PASSWORD: hunter2 options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 ports: - - 5432:5432 + - 5432:2020 mysql: image: mysql:5.7 env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes + MYSQL_USER: hc + MYSQL_PASSWORD: hunter2 ports: - - 3306:3306 + - 3306:2020 options: >- --health-cmd="mysqladmin ping" --health-interval=10s @@ -52,9 +55,10 @@ jobs: pip install braintree mysqlclient apprise - name: Run Tests env: - DB: mysql + DB: ${{ matrix.db }} DB_HOST: 127.0.0.1 - DB_PORT: 3306 - DB_USER: root + DB_PORT: 2020 + DB_USER: hc + DB_PASSWORD: hunter2 run: | python manage.py test