Phase 4: Mustang EN16931/PDF-A-3 validation in CI
Validate e-invoices / mustang (push) Failing after 1m30s
Validate e-invoices / mustang (push) Failing after 1m30s
Adds a Gitea Actions workflow that generates realistic e-invoice fixtures (multi-VAT-rate original invoice, Storno, Gutschrift) and validates them against the reference Mustang validator on every push, catching a broken EN16931 mapping before it reaches production instead of relying on manual spot-checks.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
name: Validate e-invoices
|
||||
|
||||
# Phase 4 of the e-invoicing migration (see the payload repo's memory notes
|
||||
# on the full 6-phase plan) — generates a small set of realistic Factur-X
|
||||
# fixtures (scripts/generate-einvoice-fixtures.mts: multi-VAT-rate original
|
||||
# invoice, Stornorechnung, Gutschrift) and validates them with Mustang, the
|
||||
# reference ZUGFeRD/Factur-X/EN16931 + PDF/A-3 validator. Runs on the
|
||||
# self-hosted vps-runner (git.mk360.de's own Gitea Actions runner, Docker
|
||||
# execution mode) — see /home/marco/dev/docker/docker-compose.yml's
|
||||
# act_runner service comment for the trust-boundary notes.
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
mustang:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Generate e-invoice fixtures
|
||||
run: npm run fixtures:einvoice
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: "21"
|
||||
|
||||
- name: Download Mustang-CLI
|
||||
run: |
|
||||
curl -fsSL -o mustang-cli.jar https://github.com/ZUGFeRD/mustangproject/releases/download/core-2.24.0/Mustang-CLI-2.24.0.jar
|
||||
echo "e4904ffa0afdce3f5836dceb927c440a05ed5d60386fdd37e17a4b2f7652edbf mustang-cli.jar" | sha256sum -c -
|
||||
|
||||
# validateExpectValid recursively checks every file under -d and
|
||||
# exits non-zero if any of them fails EN16931/PDF-A-3 conformance —
|
||||
# covers all 3 fixtures (original invoice, Stornorechnung,
|
||||
# Gutschrift) in one call.
|
||||
- name: Validate fixtures against EN16931 (Mustang)
|
||||
run: java -Xmx1G -Dfile.encoding=UTF-8 -jar mustang-cli.jar --no-notices --action validateExpectValid -d .mustang-fixtures
|
||||
Reference in New Issue
Block a user