From 7122c2ef1603a957979a8c0dfa165ed0aaa456e5 Mon Sep 17 00:00:00 2001 From: Mihaela Mihaljevic Date: Fri, 26 Jun 2026 10:02:41 +0200 Subject: [PATCH] ci: run the XSTS conformance ratchet on every change (#323) The schema/instance validity baselines (Tests/XSTSSuiteTests.swift) were only checked opt-in. Now that the unmodified corpus archive is vendored, a dedicated workflow extracts it (no network) and runs the ratchet in release on every push and PR, so a conformance regression fails CI. Adds the matching README badge. --- .github/workflows/swift-xsts.yml | 27 +++++++++++++++++++++++++++ README.md | 1 + 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/swift-xsts.yml diff --git a/.github/workflows/swift-xsts.yml b/.github/workflows/swift-xsts.yml new file mode 100644 index 0000000..3d9213b --- /dev/null +++ b/.github/workflows/swift-xsts.yml @@ -0,0 +1,27 @@ +name: XSTS conformance + +# Runs the W3C XML Schema Test Suite ratchet (Tests/XSTSSuiteTests.swift) on every +# change, so a regression in the schema/instance validity baselines fails CI. The +# corpus is extracted from the vendored archive (Tests/Fixtures/xsts), so this needs +# no network. The gate is release-only because the debug run is far slower. + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + xsts: + name: XSTS conformance + runs-on: ubuntu-latest + container: swift:6.2 + steps: + - uses: actions/checkout@v6 + - name: Extract the vendored XSTS corpus + run: XSTS_DEST=/tmp/xsts bash scripts/fetch-xsts.sh + - name: Conformance ratchet + run: XSTS_ROOT=/tmp/xsts/xmlschema2006-11-06 swift test -c release --filter XSTSSuiteTests diff --git a/README.md b/README.md index 54400bd..960a61d 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ [![Swift Linux](https://github.com/mihaelamj/PureXML/actions/workflows/swift-linux.yml/badge.svg)](https://github.com/mihaelamj/PureXML/actions/workflows/swift-linux.yml) [![Swift Windows](https://github.com/mihaelamj/PureXML/actions/workflows/swift-windows.yml/badge.svg)](https://github.com/mihaelamj/PureXML/actions/workflows/swift-windows.yml) [![Swift WASM](https://github.com/mihaelamj/PureXML/actions/workflows/swift-wasm.yml/badge.svg)](https://github.com/mihaelamj/PureXML/actions/workflows/swift-wasm.yml) +[![XSTS conformance](https://github.com/mihaelamj/PureXML/actions/workflows/swift-xsts.yml/badge.svg)](https://github.com/mihaelamj/PureXML/actions/workflows/swift-xsts.yml) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) PureXML is a dependency-free XML package written entirely in Swift.