Skip to content

Update GitHub Actions #126

Update GitHub Actions

Update GitHub Actions #126

Workflow file for this run

---
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
- 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 .