From de23a45de43dbf48350bbf6b6fdb5c0014c740f2 Mon Sep 17 00:00:00 2001 From: domenico Date: Wed, 12 Aug 2026 21:10:56 +0200 Subject: [PATCH] docs: pin the README's examples to v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every `uses:` snippet still said `@v1`, so anyone copying one landed on the previous major. v2.0.0 was a breaking change — GitHub Models was retired on 2026-07-30 and Layer 3 needs a provider API key — and the surrounding prose already explains that, which made the snippets the only thing still pointing at v1. Seven occurrences, all of them copy-paste usage examples rather than before-and-after migration snippets, so there is nothing here that should stay on v1. A bare `@v2` with no `ai-api-key` does not fail: config warns that Layer 3 is disabled and falls back to Layers 1 and 2. So the quickstart stays a two-line snippet and keeps working as written. --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2bfa587..09808f5 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ jobs: run: pytest --cov --cov-report=xml # your test command - name: Test-Guard - uses: ostico/test-guard@v1 + uses: ostico/test-guard@v2 with: coverage-file: coverage.xml ai-api-key: ${{ secrets.OPENAI_API_KEY }} @@ -266,7 +266,7 @@ So a PR that only adds fields to a TypeScript `interface` passes without weakeni `test-patterns` defaults to `auto`, which uses the built-in mappings for 19 languages. To teach Test-Guard a project-specific test layout, pass a **JSON object**. Each entry maps an arbitrary id to a `src_pattern` (glob identifying a source file) and a `test_template` (glob for the expected test, with a `{name}` placeholder for the source file's stem): ```yaml -- uses: ostico/test-guard@v1 +- uses: ostico/test-guard@v2 with: test-patterns: | { @@ -492,20 +492,20 @@ When tests run inside a Docker container (or any environment with a different fi ### Coverage + heuristics + AI (default) ```yaml -- uses: ostico/test-guard@v1 +- uses: ostico/test-guard@v2 with: coverage-file: coverage.xml ``` ### Heuristics + AI only (no coverage file) ```yaml -- uses: ostico/test-guard@v1 +- uses: ostico/test-guard@v2 # Layer 1 skips, Layer 3 shortcuts use test relevance only ``` ### Heuristics only (no AI) ```yaml -- uses: ostico/test-guard@v1 +- uses: ostico/test-guard@v2 with: ai-enabled: 'false' # Layer 2 becomes the gate (short-circuits on all-PASS) @@ -513,7 +513,7 @@ When tests run inside a Docker container (or any environment with a different fi ### Strict threshold with AI ```yaml -- uses: ostico/test-guard@v1 +- uses: ostico/test-guard@v2 with: coverage-file: coverage.xml coverage-threshold: '95' @@ -522,7 +522,7 @@ When tests run inside a Docker container (or any environment with a different fi ### Multiple coverage files (e.g. PHP + JS) ```yaml -- uses: ostico/test-guard@v1 +- uses: ostico/test-guard@v2 with: coverage-file: | php-coverage.xml