Switch to plain #16
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: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:15 # Set to your Postgres version | |
ports: ["5432:5432/tcp"] | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
steps: | |
- run: sudo apt update && sudo apt install libpq-dev | |
- uses: actions/checkout@v4 | |
- run: pipx install poetry | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" # Set to your Python version | |
cache: poetry | |
- run: | | |
poetry config installer.parallel false # Avoid race condition in git repo cloning | |
poetry install | |
- run: | | |
poetry run plain compile | |
poetry run plain test | |
env: | |
PLAIN_DEBUG: true | |
PLAIN_SECRET_KEY: testing | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres |