Skip to content

Add a GitHub Action and a GitLab CI template - #181

Draft
gronke wants to merge 1 commit into
itplr-kosit:mainfrom
gronke:feature/ci-action
Draft

Add a GitHub Action and a GitLab CI template#181
gronke wants to merge 1 commit into
itplr-kosit:mainfrom
gronke:feature/ci-action

Conversation

@gronke

@gronke gronke commented Jul 23, 2026

Copy link
Copy Markdown

Adds CI integration for the validator: a GitHub Action and a GitLab CI template, both wrapping the released standalone jar.

GitHub Action (action.yml, repo root)

Consumers would write uses: itplr-kosit/validator@<ref>:

- uses: itplr-kosit/validator@main
  with:
    version: "1.6.2"
    configuration: "https://github.com/itplr-kosit/validator-configuration-xrechnung/releases/download/v2026-01-31/xrechnung-3.0.2-validator-configuration-2026-01-31.zip"
    files: invoices/
  • Inputs: version (release jar to fetch), checksum (optional SHA-256 pin), configuration (zip URL or local unpacked path), configuration-checksum, files (file/dir/glob), report-dir.
  • Outputs: accepted, rejected, report-dir.
  • Composite action, official actions only (setup-java@v5, Temurin 21); per-file PASS/FAIL lines with the failing rule ids grepped from report and output; non-zero exit on any rejection.
  • Deliberately plain: no Docker sealing here; that stays our downstream policy in the invoicing repo so the upstream proposal remains small and reviewable for KoSIT.

GitLab template (gitlab/validator.gitlab-ci.yml)

An include:-able .kosit-validate hidden job on eclipse-temurin:21-jre with variables mirroring the action inputs; reports uploaded as artifacts. Works on any instance (KoSIT's own home is a self-hosted GitLab).

Self-test (.github/workflows/action-test.yml)

Two jobs against the XRechnung 3.0.2 configuration (2026-01-31, checksummed):

  • accept: KoSIT testsuite reference instance 01.01a must validate, outputs asserted.
  • reject: a date-corrupted copy must be rejected - the job passes only if the action fails (outcome == failure).

README

A "Continuous Integration" subsection under Usage, following upstream's README conventions.

Both wrap the released standalone jar so XML documents can be validated as part of a pipeline: download the release (optionally SHA-256-verified), run each file against a validation configuration, fail on any rejection with the failing rule ids printed, and expose the reports plus the accepted/rejected counts.
The action self-test validates a conformant XRechnung reference instance and asserts a corrupted one is rejected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant