Skip to content

Workflow file for this run

name: run tests

Check failure on line 1 in .github/workflows/run-test.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/run-test.yaml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: runner-job
on:
pull_request:
paths:
- '**.py'
- '**.toml'
- '**.lock'
push:
paths:
- '**.py'
- '**.toml'
- '**.lock'
- '**.yaml'
branches:
- main
jobs:
# Label of the runner job
runner-job:
# You must use a Linux environment when using service containers or container jobs
runs-on: ubuntu-latest
# Service containers to run with `runner-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres:16-alpine
# Provide the password for postgres
env:
POSTGRES_DB: example
POSTGRES_USER: example
POSTGRES_PASSWORD: example
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: '3.10'
- name: Install dependencies
run: pdm install -dG test
- name: Add environment variables
run: cp .env.example .env
- name: Run tests
run: pdm run pytest --cov=src