[WIP] Add AG-64/96 extension #1182
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: 🐘 Datamodel | Tests | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- datamodel/** | |
- '.github/workflows/datamodel-test.yml' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- datamodel/** | |
- '.github/workflows/datamodel-test.yml' | |
workflow_dispatch: | |
jobs: | |
datamodel-tests: | |
name: Run unit tests on datamodel | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
psycopg-version: [ 2, 3 ] | |
extension: ["", "agxx"] | |
fail-fast: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Docker build | |
run: | | |
docker build \ | |
--build-arg RUN_TEST=True \ | |
--build-arg PSYCOPG_VERSION=${{ matrix.psycopg-version }} \ | |
-f datamodel/.docker/Dockerfile \ | |
--tag teksi/wastewater:unstable . | |
- name: Initialize container | |
run: | | |
docker run -d -p 5432:5432 --name teksi-wastewater -e EXTENSION_NAMES=${{ matrix.extension }} teksi/wastewater:unstable | |
docker exec teksi-wastewater init_db.sh wait | |
- name: Run tests | |
run: docker exec teksi-wastewater pytest datamodel | |
- name: Docker logs | |
if: failure() | |
run: docker logs teksi-wastewater | |
static-tests: | |
name: Run static tests on datamodel | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: ./datamodel/test/static_tests.sh |