Test for post usage when combining usage items #191
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: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
python_version: ['3.11'] | |
services: | |
postgres: | |
image: postgres:14 | |
env: | |
POSTGRES_PASSWORD: password | |
ports: | |
- 5432:5432 | |
redis: | |
image: redis | |
ports: | |
# Opens tcp port 6379 on the host and service container | |
- 6379:6379 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python_version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v3 | |
- name: Install dependencies | |
run: poetry install --all-extras | |
- name: Run main tests | |
shell: bash | |
run: CELERY_RESULT_BACKEND="redis://localhost:6379/0" scripts/runtests.sh -d -c main | |
- name: Run route tests | |
shell: bash | |
run: scripts/runtests.sh -d -c routes | |
- name: Check DB downgrade | |
shell: bash | |
# Downgrade to the initial alembic revision | |
run: | | |
set -a | |
source example.auth.env | |
source example.env | |
set +a | |
poetry run alembic upgrade head | |
poetry run alembic downgrade b65796c99771 | |
poetry run alembic upgrade head | |
docker_build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check that we can build docker container image | |
run: docker build . |