Verified Commit 1eada85d authored by Jakob Moser's avatar Jakob Moser
Browse files

Sooner or later, I always arrive at a CI pipeline

parent e0293064
Loading
Loading
Loading
Loading
Loading

.coveragerc

0 → 100644
+6 −0
Original line number Diff line number Diff line
[run]
command_line=-m pytest --junit-xml=testresults.xml tests
source=.

[report]
precision=2
 No newline at end of file

.gitlab-ci.yml

0 → 100644
+42 −0
Original line number Diff line number Diff line
lint-python:
    image: ghcr.io/astral-sh/uv:python3.12-bookworm
    stage: test
    before_script:
        - uv sync --locked
    script:
        - uv run ruff check .
        - uv run ruff format --check .
    allow_failure: true

typecheck-python:
    image: ghcr.io/astral-sh/uv:python3.12-bookworm
    stage: test
    before_script:
        - uv sync --locked
    script:
        - uv run mypy --strict . --cobertura-xml-report .mypycoverage --junit-xml typecheckresults.xml --junit-format per_file
    allow_failure: true
    artifacts:
        when: always
        reports:
            coverage_report:
                coverage_format: cobertura
                path: .mypycoverage/cobertura.xml
            junit: typecheckresults.xml

test:
    image: ghcr.io/astral-sh/uv:python3.12-bookworm
    stage: test
    before_script:
        - uv sync --locked
    script:
        - uv run coverage run
        - uv run coverage report
        - uv run coverage xml
    coverage: '/TOTAL .* (\d{1,3}.\d{2})%/'
    artifacts:
        reports:
            coverage_report:
                coverage_format: cobertura
                path: coverage.xml
            junit: testresults.xml
+1 −0
Original line number Diff line number Diff line
@@ -41,5 +41,6 @@ select = [

[dependency-groups]
dev = [
    "coverage>=7.14.3",
    "pytest>=9.1.1",
]
+74 −1

File changed.

Preview size limit exceeded, changes collapsed.