Skip to content

Commit

Permalink
test on mysql and postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
felixrindt committed Feb 8, 2021
1 parent 033ec65 commit 81fd0ce
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,17 @@ jobs:
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: [ 3.8, 3.9 ]
database: [ sqlite, mysql ]
include:
- database: sqlite
database_url: "sqlite:///data/db.sqlite3"
database_cmd: "echo sqlite is installed"
- database: mysql
database_url: "mysql://root:root@127.0.0.1:3306/ephios"
database_cmd: "sudo systemctl start mysql.service"

steps:
- uses: actions/checkout@v2
Expand All @@ -58,13 +67,17 @@ jobs:
restore-keys: |
${{ runner.os }}-poetry-
- name: Install dependencies
run: poetry install
run: poetry install -E mysql -E pgsql # install all extras to have less caches
- name: Prepare files for test run
run: |
cp .env.example .env
poetry run python manage.py collectstatic
poetry run python manage.py compilejsi18n
- name: Prepare database
run: ${{ matrix.database_cmd }}
- name: Test apps
env:
DATABASE_URL: ${{ matrix.database_url }}
run: poetry run coverage run --source=ephios -m pytest tests/
- name: Coveralls
env:
Expand Down

0 comments on commit 81fd0ce

Please sign in to comment.