feat: add working_directory input - #49
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: masterpointio/github-action-tf-test/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
gberenice
pushed a commit
that referenced
this pull request
Sep 21, 2026
🤖 I have created a release *beep* *boop* --- ## [1.1.0](v1.0.1...v1.1.0) (2026-09-21) ### Features * add working_directory input ([#49](#49)) ([0350841](0350841)) ### Bug Fixes * pin GitHub Actions to commit SHAs (INT-326) ([#33](#33)) ([8dc20b2](8dc20b2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: masterpointbot[bot] <177651640+masterpointbot[bot]@users.noreply.github.com>
gberenice
added a commit
to masterpointio/actions
that referenced
this pull request
Sep 21, 2026
## What
The `tf-test` reusable workflow assumed a single module at the
repository root, so monorepos had to hand-roll their own aqua + `init` +
`test` steps instead of consuming it.
- Add a `discover` job that finds every directory containing
`*.tftest.hcl` files and emits them as a JSON array. Both the `tests/`
subdirectory and module-root layouts collapse to the module directory.
- Fan the test job out across `(tf_type x module)` with `fail-fast:
false`, so callers stay zero-config as modules are added.
- Relax `aws_role_arn` and the `SPACELIFT_*` secrets to optional, since
they're consumer-specific and not every repo under test touches AWS or
Spacelift. Drop the redundant `required: false` lines and describe each
secret.
- Add job timeouts (5m discover, 30m test).
- Bump `masterpointio/github-action-tf-test` to v1.1.0, which adds the
`working_directory` input this depends on.
## Backwards compatibility
Root-level modules report as `.` and keep their original job name:
```yaml
name: 🧪 ${{ matrix.tf }} test${{ matrix.module != '.' && format(' ({0})', matrix.module) || '' }}
```
Without this, `terraform-spacelift-automation`'s checks would rename
from `🧪 tofu test` to `🧪 tofu test (.)` and break any branch protection
rules keyed to those names.
## Dependencies
masterpointio/github-action-tf-test#49 — merged
and released as
[v1.1.0](https://github.com/masterpointio/github-action-tf-test/releases/tag/v1.1.0),
now pinned here.
## Testing
Discovery pipeline verified against `infra-monorepo-template` (returns
`["child-modules/random-pet"]`) and against an empty repo (returns `[]`,
which skips the test job via the `if:` guard). `actionlint`, `zizmor
--persona=pedantic`, and `yamllint` all pass.
## Follow-up
`infra-monorepo-template` switches its hand-rolled `test.yaml` over to
this workflow once it's released.
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
The action always ran
initandtestfrom the repository root, which only suits repos holding a single module. Add aworking_directoryinput so monorepos can point each matrix leg at the module under test.Backwards compatibility
The input defaults to
., so every existing caller behaves exactly as before.Aqua still resolves
aqua.yamlfrom the repository root rather than fromworking_directory, which keeps pinned CLI versions consistent across all modules in a monorepo.Why now
This unblocks masterpointio/actions#4, which adds monorepo test discovery to the shared
tf-testreusable workflow. That PR already passesworking_directorybut carries aTODOon its action pin, because the input doesn't exist in any release yet. Once this merges and is released, that pin gets bumped to the new SHA.Testing
actionlint,zizmor --persona=pedantic,yamllint,prettier, andmarkdownlintall pass via trunk.Made with Cursor