From c1bb5aa8d6b7aa742c29d7fa8beb3f0809c5af8d Mon Sep 17 00:00:00 2001 From: Mihaela M Date: Mon, 29 Jun 2026 12:06:58 +0200 Subject: [PATCH] ci: gate conformance on every push, fetching the test-suite The parse, value, and canonical event-stream conformance suites were opt-in (PUREYAML_RUN_YAML_TEST_SUITE=1) and so never ran in CI: an oracle that only runs when asked is not a gate. Add a Conformance workflow that fetches the canonical yaml-test-suite and runs all three suites, so the event gate's recorded-gap set fails the build on any regression or silently-closed gap, and add its README badge alongside the other quality gates. --- .github/workflows/conformance.yml | 26 ++++++++++++++++++++++++++ README.md | 1 + 2 files changed, 27 insertions(+) create mode 100644 .github/workflows/conformance.yml diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml new file mode 100644 index 0000000..32e16ad --- /dev/null +++ b/.github/workflows/conformance.yml @@ -0,0 +1,26 @@ +name: Conformance + +# Canonical YAML test-suite conformance: parse-level, value-level, and the canonical +# event-stream gate. The corpus is fetched, not vendored, so this job fetches it and then +# runs the opt-in conformance tests as a gate. The event gate's recorded-gap set fails the +# build on any regression or any silently-closed gap. One concern, one badge. + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + conformance: + name: Conformance + runs-on: macos-latest + steps: + - uses: actions/checkout@v6 + - name: Fetch the canonical yaml-test-suite + run: bash scripts/fetch-yaml-test-suite.sh + - name: Run conformance gates + run: PUREYAML_RUN_YAML_TEST_SUITE=1 swift test --filter Conformance diff --git a/README.md b/README.md index 0a58169..c373a6c 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ [![Linux](https://github.com/mihaelamj/PureYAML/actions/workflows/linux.yml/badge.svg?branch=main)](https://github.com/mihaelamj/PureYAML/actions/workflows/linux.yml) [![Windows](https://github.com/mihaelamj/PureYAML/actions/workflows/windows.yml/badge.svg?branch=main)](https://github.com/mihaelamj/PureYAML/actions/workflows/windows.yml) [![WASM](https://github.com/mihaelamj/PureYAML/actions/workflows/wasm.yml/badge.svg?branch=main)](https://github.com/mihaelamj/PureYAML/actions/workflows/wasm.yml) +[![Conformance](https://github.com/mihaelamj/PureYAML/actions/workflows/conformance.yml/badge.svg?branch=main)](https://github.com/mihaelamj/PureYAML/actions/workflows/conformance.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) PureYAML is a dependency-free YAML package written entirely in Swift.