Compare commits
2 commits
main
...
test-gitla
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76e85baf83 | ||
|
|
64caf4d379 |
3 changed files with 74 additions and 2 deletions
72
.gitlab-ci.yml
Normal file
72
.gitlab-ci.yml
Normal 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
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
2
tox.ini
2
tox.ini
|
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py38,py310
|
envlist = py312
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
skip_missing_interpreters = True
|
skip_missing_interpreters = True
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue