From 24f6aaebfc750d17d8a971ea4ce283df043edb81 Mon Sep 17 00:00:00 2001 From: Manfred Riem <15701806+mnriem@users.noreply.github.com> Date: Fri, 20 Nov 2026 11:29:52 -0600 Subject: [PATCH] ci: validate Spec Kit presets on pull requests Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/preset-validation.yml | 38 +++++++++++++++++++++++++ spec-kit-presets/README.md | 15 ++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .github/workflows/preset-validation.yml diff --git a/.github/workflows/preset-validation.yml b/.github/workflows/preset-validation.yml new file mode 100644 index 00000000..4f17ce0a --- /dev/null +++ b/.github/workflows/preset-validation.yml @@ -0,0 +1,38 @@ +name: Preset validation + +on: + pull_request: + paths: + - 'spec-kit-presets/**' + - '.github/workflows/preset-validation.yml' + +permissions: + contents: read + +jobs: + validate: + name: Preset unit and CLI smoke tests + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 + with: + python-version: '3.13' + - name: Run preset tests with released Specify CLIs + shell: bash + run: | + lean="$RUNNER_TEMP/specify-lean" + full="$RUNNER_TEMP/specify-full" + python -m venv "$lean" + python -m venv "$full" + "$lean/bin/python" -m pip install 'specify-cli==1.0.8' + "$full/bin/python" -m pip install 'specify-cli==1.2.3' -r spec-kit-presets/tests/requirements.txt + + export SPECIFY_BIN="$lean/bin/specify" + export FULL_SPECIFY_BIN="$full/bin/specify" + "$SPECIFY_BIN" --version + "$FULL_SPECIFY_BIN" --version + "$full/bin/python" -m unittest discover -s spec-kit-presets/tests -v diff --git a/spec-kit-presets/README.md b/spec-kit-presets/README.md index d0f01149..06f0aa63 100644 --- a/spec-kit-presets/README.md +++ b/spec-kit-presets/README.md @@ -107,6 +107,21 @@ spec-kit-presets/ └── commands/ ``` +## Validation + +The [Preset validation workflow](../.github/workflows/preset-validation.yml) +runs on pull requests that touch this directory or the workflow itself. It runs +the unit suite and installs and renders both SDD presets with released Specify +CLIs: 1.0.8 for Lean (its minimum supported version) and 1.2.3 for Full (its +required version). The CLIs use separate Python virtual environments. + +To run the suite locally from the repository root, install the dependencies in +`spec-kit-presets/tests/requirements.txt` and run +`python -m unittest discover -s spec-kit-presets/tests -v`. To include both CLI +smoke tests, set `SPECIFY_BIN` and `FULL_SPECIFY_BIN` to the absolute paths of +the respective `specify` executables. The release-archive checks, Full upstream +source comparison, and extension hook CLI and Copilot exercises remain opt-in. + ## Versioning & distribution Presets are versioned and released **independently** of the Copilot plugins in this