Skip to content

Log Job Details

Log Job Details #233

Workflow file for this run

name: End to End Test
on: push
jobs:
db-job:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
# Copy repo contents into container (needed to populate DB)
volumes:
- ${{ github.workspace }}:/repo
pushgateway:
image: prom/pushgateway
options: >-
--health-cmd="wget --spider --quiet http://localhost:9091/metrics || exit 1"
--health-interval=10s
--health-timeout=5s
--health-retries=5
ports:
- 9091:9091
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install poetry
run: pip install poetry
- name: Install Requirements
run: POETRY_VIRTUALENVS_CREATE=false python -m poetry install
- name: Run tests with coverage
run: pytest --cov=src --cov-report=html --cov-fail-under=90
# Environment variables used by the `pg_client.py`
env:
DB_URL: postgresql://postgres:postgres@localhost:5432/postgres
PROMETHEUS_PUSHGATEWAY_URL: http://localhost:9091
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: htmlcov