Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
Jonathan Harker
76e85baf83 fixes 2026-02-26 18:13:52 +13:00
Jonathan Harker
64caf4d379 UC-68 testing GitLab jobs 2026-02-26 17:26:42 +13:00
3 changed files with 74 additions and 2 deletions

72
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,72 @@
stages:
- lint
- test
.venv-job:
before_script:
- uv venv -p 3.12 --clear .venv
- source .venv/bin/activate
- uv pip install -r requirements-dev.txt
cache:
paths:
- .venv
# TODO: this is still fictional, but an example of how to prep a docker job in GitLab
.docker-job:
tags:
- docker
before_script:
- docker compose build
- docker compose down --remove-orphans --volumes # Ensures empty database always created with .env DB_PASSWORD
- docker compose run postgres bash -c "bin/restore-test-database.sh"
# -----------------------------------------------------------------
# Run some basic linting in parallel
lint:flakes:
stage: lint
only:
- pushes
extends: .venv-job
script:
- uv pip install flake8
- flake8 $(git ls-files|grep py$)
# lint:ruff:
# stage: lint
# only:
# - pushes
# extends: .venv-job
# script:
# - ruff check
#
# lint:gitleaks:
# stage: lint
# only:
# - pushes
# extends: .venv-job
# script:
# - gitleaks git
test:test:
stage: test
only:
- pushes
extends: .venv-job
variables:
PYTHONDONTWRITEBYTECODE: 1
PYTHONUNBUFFERED: 1
script:
- tox
coverage: '/TOTAL.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
when: always
paths:
- junit.xml
- coverage.xml
reports:
junit: junit.xml
coverage_report:
coverage_format: cobertura
path: coverage.xml

View file

@ -5,7 +5,7 @@ For the full list of built-in configuration values, see the
""" """
import sys import sys
import sphinx_rtd_theme # import sphinx_rtd_theme
from pathlib import Path from pathlib import Path

View file

@ -1,5 +1,5 @@
[tox] [tox]
envlist = py38,py310 envlist = py312
skipsdist = True skipsdist = True
skip_missing_interpreters = True skip_missing_interpreters = True