treetrail-backend/.forgejo/workflows/test.yaml
phil 8bfb410ee1
All checks were successful
/ test (push) Successful in 25s
/ build (push) Successful in 6s
CI: set db host for tests
2024-12-08 05:57:04 +01:00

34 lines
858 B
YAML

on:
push:
workflow_dispatch:
inputs:
verbose:
description: "Verbose"
required: false
default: false
type: boolean
jobs:
test:
runs-on: container
container:
image: code.philo.ydns.eu/philorg/treetrail-backend-ci
volumes:
- "uv_cache:/root/.cache/uv"
- "ca-cert:/etc/containers/certs.d"
services:
treetrail-database:
image: code.philo.ydns.eu/philorg/treetrail-database
steps:
- name: Echo env
if: ${{ inputs.verbose }}
run: |
echo '${{ toJSON(env) }}'
- uses: actions/checkout@v4
- name: Install app with 'uv pip install'
run: uv pip install --python=$UV_PROJECT_ENVIRONMENT --no-deps .
- name: Run tests (API call)
run: TREETRAIL_DB_HOST=treetrail-database pytest -s tests/basic.py