Add pytest suite and CI test gate
Some checks failed
docker / test (push) Failing after 1m18s
docker / build-and-push (push) Has been skipped

This commit is contained in:
Space-Banane
2026-05-20 22:04:41 +02:00
parent 18f2ec2937
commit be24e7c071
3 changed files with 162 additions and 0 deletions

View File

@@ -9,7 +9,41 @@ on:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:11
env:
MARIADB_DATABASE: jellomator_test
MARIADB_USER: jellomator
MARIADB_PASSWORD: jellomator
MARIADB_ROOT_PASSWORD: root
ports:
- 3306:3306
options: >-
--health-cmd="mariadb-admin ping -h 127.0.0.1 -uroot -proot"
--health-interval=5s
--health-timeout=5s
--health-retries=20
env:
DB_HOST: 127.0.0.1
DB_PORT: "3306"
DB_USER: jellomator
DB_PASSWORD: jellomator
DB_NAME: jellomator_test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Python dependencies
run: pip install -r backend/requirements-dev.txt
- name: Run backend tests
run: pytest -q
build-and-push:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4