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.
This commit is contained in:
Mihaela Mihaljevic 2026-06-26 10:02:41 +02:00 committed by GitHub
parent 925172cd84
commit 7122c2ef16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 28 additions and 0 deletions

27
.github/workflows/swift-xsts.yml vendored Normal file
View File

@ -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

View File

@ -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.