feat: control displayed sponsors #230
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: CI | |
on: [workflow_dispatch, pull_request] | |
env: | |
SECRET_KEY: thisisasecret | |
DATABASE_URL: postgresql:https://postgres:password@localhost:5432/postgres | |
jobs: | |
ci: | |
runs-on: ubuntu-20.04 | |
services: | |
postgres: | |
image: postgres:11-alpine | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'poetry' | |
- name: Set up Python dependencies | |
run: | | |
poetry install | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 8 | |
- name: Setup Yarn install | |
uses: borales/actions-yarn@v4 | |
with: | |
cmd: install | |
- name: Run ruff on src | |
run: | | |
poetry run ruff check src | |
- name: Run DB migration for test | |
run: | | |
poetry run python src/manage.py migrate --verbosity 1 --noinput | |
- name: Run Test | |
run: | | |
cd src | |
poetry run pytest -n 2 --cov=. --cov-report=term-missing --cov-report=xml | |
- name: Run Codecov action | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: false | |
files: ./src/coverage.xml | |
verbose: true | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |