-
Notifications
You must be signed in to change notification settings - Fork 55
feat: update CONTRIBUTION docs to explain both tests, and update CI for both tests #384
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the documentation and CI pipeline to clarify that the repository supports both TypeScript and Terraform testing approaches. The changes align the documentation with the actual testing practices and ensure both test types run in CI.
- Update CONTRIBUTING.md to explain both TypeScript tests (
bun test
) and Terraform tests (terraform test
) - Add Terraform test execution to the CI workflow
- Clarify testing requirements for new vs existing modules
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
CONTRIBUTING.md | Updated documentation to explain dual testing approaches and provide clear guidance for both TypeScript and Terraform tests |
.github/workflows/ci.yaml | Added Terraform test execution step to ensure both test types run in CI |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
CONTRIBUTING.md
Outdated
@@ -124,18 +124,27 @@ This script generates: | |||
- Accurate description and usage examples | |||
- Correct icon path (usually `../../../../.icons/your-icon.svg`) | |||
- Proper tags that describe your module | |||
3. **Create at least one `.tftest.hcl`** to test your module with `terraform test` | |||
3. **Create tests for your module:** | |||
- **New modules**: Create `.tftest.hcl` files and test with `terraform test` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also include TypeScript testing for new modules, as we can not test the business logic of scripts with Terraform-only tests.
Co-authored-by: Atif Ali <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a few suggestions. I think we need to have both simultaneously.
TypeScript tests can be skipped if the module does not run any scripts.
Ahh I okay I'm seeing the whole picture better now. I'll commit your other change and give it one more look over before it's merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we update the script in package.json
to run all tests when someone run bun test
Doesn't the package.json currently do this already?
|
I think we just need to omit the examples from the terraform_test_all.sh script. I will do this tomorrow morning and get this finished up. |
Closes #383
Description
Type of Change
Testing & Validation
bun test
)bun run fmt
)