Bump platformdirs from 4.2.2 to 4.3.6 #178
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: push | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:15 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: test_db | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install PostgreSQL client | |
run: sudo apt-get -yqq install postgresql-client | |
- name: Create schema | |
run: psql -h localhost -U postgres -d test_db -c "DROP SCHEMA public CASCADE;" | |
env: | |
PGPASSWORD: postgres | |
- name: Restore database from backup | |
run: pg_restore --no-owner -h localhost -U postgres -d test_db tests/rating.backup | |
env: | |
PGPASSWORD: postgres | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
cache: 'poetry' | |
- name: Install dependencies | |
run: poetry install | |
- name: Run tests | |
run: poetry run python -m unittest | |
env: | |
DJANGO_POSTGRES_DB_PASSWORD: postgres | |
DJANGO_POSTGRES_DB_HOST: localhost | |
DJANGO_POSTGRES_DB_USER: postgres | |
DJANGO_POSTGRES_DB_NAME: test_db | |
DJANGO_POSTGRES_DB_PORT: 5432 | |
DJANGO_SETTINGS_MODULE: dj.settings | |
DJANGO_SECRET_KEY: dummy_value | |
- name: Run Black formatter | |
run: poetry run python -m black . --check |