-
Notifications
You must be signed in to change notification settings - Fork 0
Add generated workflow validation coverage #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
2b9f838
Add rendered workflow contracts for Python template
leynos 6da5178
Add act switch to generated test target
leynos 958ee77
Add parent template test Makefile
leynos 1e8f361
Address workflow validation review comments
leynos 527e70f
Document rendered test helpers
leynos 13ff3b3
Address helper contract review findings
leynos 12e52e5
Normalize developer guide spelling
leynos 04e678f
Add direct helper error-path tests
leynos 0afdfb8
Tighten helper unit test contracts
leynos c4e02b2
Cover parent Makefile and helper module roles
leynos e47324d
Anchor Makefile tests and strengthen snapshots
leynos 38beb8b
Document snapshot quality guidance
leynos 8e1cda7
Validate AGENTS make target command contracts
leynos ed0e2d3
Guard parent test target uvx lookup
leynos 8577d0a
Document parent Makefile help target
leynos 1cfa739
Prove Rust test target runs doctests
leynos d193267
Tighten doctest regression review fixes
leynos 7be16d8
Add generated dependency audit gate
leynos dd96c24
Split act validation into separate workflows
leynos a22c033
Stop installing mdformat-all in parent CI
leynos c7e44d5
Always run Rust doctests in generated tests
leynos c22ba24
Harden parent workflow tool installs
leynos 3e88bf1
Document parent Makefile and CI workflows
leynos ffbdbe2
Harden generated act validation workflow
leynos a280a9a
Document audit in README quality gate flow
leynos add4767
Clarify workflow contract assertion failures
leynos 22de12b
Clear RUSTFLAGS during generated Rust tool installs
leynos e235e3a
Report act coverage failures after log checks
leynos 67cf116
Document temporary lint suppression follow-ups
leynos 60ebe6a
Update shared actions coverage pin
leynos e480d72
Require Node24-capable act for validation
leynos b44b9a3
Forward nested act GitHub token explicitly
leynos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| name: Act Validation | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| act-validation: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| ACT_VERSION: v0.2.84 | ||
| MARKDOWNLINT_CLI2_VERSION: 0.22.1 | ||
| MBAKE_VERSION: 1.4.6 | ||
| steps: | ||
| - name: Check out repository | ||
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | ||
| with: | ||
| python-version: '3.13' | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5 | ||
|
|
||
| - name: Set up Rust | ||
| uses: leynos/shared-actions/.github/actions/setup-rust@455d9ed03477c0026da96c2541ca26569a74acac | ||
| with: | ||
| toolchain: stable | ||
|
|
||
| - name: Install template test tools | ||
| run: | | ||
| act_archive=act_Linux_x86_64.tar.gz | ||
| act_url="https://github.com/nektos/act/releases/download/${ACT_VERSION}/${act_archive}" | ||
| curl -fsSLo "${act_archive}" "${act_url}" | ||
| act_sha256="$( | ||
| curl -fsSL "https://api.github.com/repos/nektos/act/releases/tags/${ACT_VERSION}" | | ||
| python -c 'import json, sys; release = json.load(sys.stdin); print(next(asset["digest"].split(":", 1)[1] for asset in release["assets"] if asset["name"] == "act_Linux_x86_64.tar.gz"))' | ||
| )" | ||
| printf '%s %s\n' "${act_sha256}" "${act_archive}" | sha256sum -c - | ||
| sudo tar -xzf "${act_archive}" -C /usr/local/bin act | ||
| npm install -g "markdownlint-cli2@${MARKDOWNLINT_CLI2_VERSION}" | ||
| uv tool install "mbake==${MBAKE_VERSION}" | ||
|
|
||
| - name: Check Docker runtime | ||
| run: docker info | ||
|
|
||
| - name: Run template tests with act validation | ||
| env: | ||
| ACT_GITHUB_TOKEN: ${{ github.token }} | ||
| run: make test WITH_ACT=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| MARKDOWNLINT_CLI2_VERSION: 0.22.1 | ||
| MBAKE_VERSION: 1.4.6 | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out repository | ||
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | ||
| with: | ||
| python-version: '3.13' | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5 | ||
|
|
||
| - name: Set up Rust | ||
| uses: leynos/shared-actions/.github/actions/setup-rust@455d9ed03477c0026da96c2541ca26569a74acac | ||
| with: | ||
| toolchain: stable | ||
|
|
||
| - name: Install template test tools | ||
| run: | | ||
| npm install -g "markdownlint-cli2@${MARKDOWNLINT_CLI2_VERSION}" | ||
| uv tool install "mbake==${MBAKE_VERSION}" | ||
|
|
||
| - name: Run template tests | ||
| run: make test | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| .PHONY: help check-fmt lint test typecheck | ||
|
|
||
| MAKEFLAGS += --no-print-directory | ||
|
|
||
| UV := $(shell command -v uvx 2>/dev/null) | ||
| WITH_ACT ?= 0 | ||
| ACT_TEST_ENV = $(if $(filter 1 true yes on,$(WITH_ACT)),RUN_ACT_VALIDATION=1,) | ||
|
|
||
| ifeq ($(strip $(UV)),) | ||
| $(error uvx is required to run template tests. Install uv from https://docs.astral.sh/uv/getting-started/installation/) | ||
| endif | ||
|
|
||
| test: ## Run template tests | ||
| $(ACT_TEST_ENV) $(UV) --with pytest-copier --with pyyaml --with syrupy --with make-parser pytest tests/ | ||
|
|
||
| check-fmt: ## Verify template test formatting | ||
| $(UV) ruff format --check tests/ | ||
|
|
||
| lint: ## Run template test lint checks | ||
| $(UV) ruff check tests/ | ||
|
|
||
| typecheck: ## Run template test type checks | ||
| $(UV) --with pytest --with pytest-copier --with pyyaml --with syrupy --with make-parser ty check tests/ | ||
|
|
||
| help: ## Show available targets | ||
| @grep -E '^[a-zA-Z_-]+:.*?##' $(MAKEFILE_LIST) | \ | ||
| awk 'BEGIN {FS=":.*?## "; printf "Available targets:\n"} {printf " %-15s %s\n", $$1, $$2}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.