gisaf-backend/.forgejo/workflows/test.yaml
phil f7cd1fabbc
All checks were successful
/ test (push) Successful in 33s
CI: add redis container
2024-12-16 00:46:33 +01:00

39 lines
1 KiB
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/gisaf-backend-ci
volumes:
- "uv_cache:/root/.cache/uv"
- "ca-cert:/etc/containers/certs.d"
services:
gisaf-database:
image: code.philo.ydns.eu/philorg/gisaf-database
redis:
image: docker.io/redis:alpine
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: Initialize database
run: GISAF__DB__HOST=gisaf-database gisaf create-db
- name: Run tests (API call)
run: GISAF__DB__HOST=gisaf-database GISAF__GISAF_LIVE__REDIS=redis://redis pytest -s tests/basic.py -W ignore::DeprecationWarning