CI job
Copy this job into .gitlab-ci.yml to run prodc lint on every pipeline. It fails the pipeline
on a BROKEN proof. A need with no evidence is a warning.
The job
- Add the job. Pin the prodc version, so a new release cannot change your gate:
prodc:
stage: test
image: ghcr.io/astral-sh/uv:python3.12-bookworm-slim
needs: [test]
script:
- uvx --from prodc==0.11.3 prodc lint
- Make your test job write a junit report and keep it as an artifact:
test:
stage: test
image: ghcr.io/astral-sh/uv:python3.12-bookworm-slim
script:
- uv run pytest -q --junitxml=reports/junit.xml
artifacts:
when: always
paths: [reports/junit.xml]
reports:
junit: reports/junit.xml
- Point the proof adapter at that report in
prodc.toml:
[prodc]
files = ["product/needs/*.yaml"]
[proofs.test]
kind = "pytest"
root = "."
results = "reports/junit.xml"
needs: [test] makes GitLab download the test job's artifacts before prodc runs. With
results set, a pytest proof is DELIVERED only when its test passed in that report. Without
results, DELIVERED means the test exists.
Options
prodc lint --strictalso fails on any warning.prodc lint --baseline lint-baseline.txtshows only the warnings that are not in the file. Write the file once withprodc lint --write-baseline lint-baseline.txtand commit it.- Other adapters (
gherkin,vitest,playwright) readresultsthe same way. See Config.