Add dark mode #4
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: Test | |
on: [push] | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
env: | |
SECRET_KEY: mysecretkey | |
# Loaded in settings.py to set database configuration | |
DATABASE_URL: postgres://postgres:[email protected]/github_actions | |
# Disables SSL for the database in settings.py | |
ENV: development | |
services: | |
postgres: | |
image: postgres:14.1 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: github_actions | |
ports: | |
- 5432:5432 | |
# needed because the postgres container does not provide a healthcheck | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.9 | |
- name: Install prerequisites for psycopg2 | |
run: sudo apt-get install libpq-dev | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install hatch | |
hatch env create | |
- name: Install playwright | |
run: hatch run playwright install | |
- name: Run migrations | |
run: hatch run python manage.py migrate | |
- name: Collect static files | |
run: hatch run python manage.py collectstatic | |
- name: Run tests | |
run: hatch run coverage run --source="." -m pytest | |
- name: Produce coverage.xml | |
run: hatch run coverage xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
fail_ci_if_error: true |