Copy from other repo #5
Workflow file for this run
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.10'] | |
services: | |
postgres: | |
image: postgres:14 | |
env: | |
POSTGRES_PASSWORD: password | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python_version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: Install poetry | |
uses: abatilo/[email protected] | |
- name: Install dependencies | |
run: poetry install | |
- name: Run main tests | |
shell: bash | |
run: scripts/runtests.sh -d -c main | |
# - run: poetry run coverage xml | |
# - run: poetry run genbadge coverage --input-file coverage.xml --local | |
# - uses: LanceMcCarthy/[email protected] | |
# name: Coverage Azure Blob Upload | |
# with: | |
# connection_string: ${{ secrets.AZURE_BLOB_CONNECTION_STR }} | |
# container_name: rctabcoveragecontainer | |
# source_folder: coverage-badge.svg | |
- 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@v3 | |
- name: Check that we can build docker container image | |
run: docker build . |