teilchensammler/.woodpecker/workflow.yaml
bronsen 60344a0cf5 [tests,dependencies] install and configure coverage reports
The reports will be printed on the terminal and written in xml.

A new just recipe is added as well: `just cov`

closes: 
2025-03-18 00:15:33 +01:00

34 lines
786 B
YAML

when:
- event: push
branch: main
matrix:
PYTHON_VERSION:
- 3.13.2
- 3.12.9
steps:
- name: lint
image: pipelinecomponents/ruff
commands:
- ruff check .
- name: test
image: python:${PYTHON_VERSION}-slim
environment:
DJANGO_SETTINGS_MODULE: config.settings
DEPLOYMENT: Test
ENV_PATH: .env.ci
commands:
- python -m venv venv
- . venv/bin/activate
- python -m pip install --disable-pip-version-check --no-input --quiet -r requirements/test.txt
- python -m pytest --cov --cov-report term
services:
- name: database
image: postgres:17-alpine
environment:
POSTGRES_PASSWORD: teilchensammler
POSTGRES_DB: teilchensammler_test
POSTGRES_INITDB_ARGS: --nosync --no-instructions