Compare commits
No commits in common. "test-gitlab" and "main" have entirely different histories.
test-gitla
...
main
3 changed files with 2 additions and 74 deletions
|
|
@ -1,72 +0,0 @@
|
||||||
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 = py312
|
envlist = py38,py310
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
skip_missing_interpreters = True
|
skip_missing_interpreters = True
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue