diff --git a/.agents/rules/github_actions_workflows.md b/.agents/rules/github_actions_workflows.md index 525d2a2699..8e95dcee5b 100644 --- a/.agents/rules/github_actions_workflows.md +++ b/.agents/rules/github_actions_workflows.md @@ -10,3 +10,14 @@ globs: [".github/workflows/*.yml", ".github/workflows/*.yaml", ".github/*.yaml"] * Preserve `suppress-no-jobs-ran-error` fallback jobs in conditional workflows. * Pass inputs (e.g. `${{ inputs.issue }}`) directly to commands without redundant shell parameter stripping or conversions. +* Print console messages using GitHub workflow command syntax (e.g., + `::error::`, `::warning::`, `::notice::`, `::group::`). + +## Workflow Python Scripts & Testing +* **Test Location**: Place workflow tests under `tests/workflows/`. +* **Imports over `sys.path`**: Never alter `sys.path`. Define a `py_library` + with `imports = ["../../.github/workflows"]` in `tests/workflows/BUILD.bazel`. +* **Functional Design & Fixtures**: Keep scripts functional with one public + entry point (e.g. `process_comment()`) and private helpers (`_` prefix). Write + outputs directly when matching actions. Test end-to-end via autouse fixtures + for GHA env files and API mocks.