Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: 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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
DevelopmentCats wants to merge14 commits intomain
base:main
Choose a base branch
Loading
fromcat/contrib-docs-testing
Open
Show file tree
Hide file tree
Changes from6 commits
Commits
Show all changes
14 commits
Select commitHold shift + click to select a range
82d06f9
docs: update contribution guidelines for both module testing procedures
DevelopmentCatsAug 25, 2025
7469a6e
ci: add Terraform tests to CI workflow
DevelopmentCatsAug 25, 2025
a7bad95
chore: bun run fmt
DevelopmentCatsAug 25, 2025
37cde45
chore: clarify module requirements
DevelopmentCatsAug 25, 2025
2a78dc8
chore: add wildcard to tftest.hcl
DevelopmentCatsAug 25, 2025
6a98f83
docs(contributing): clarify testing procedures and requirements
DevelopmentCatsAug 25, 2025
7cd4969
Apply suggestion from @matifali
matifaliAug 26, 2025
7f94259
Merge branch 'main' into cat/contrib-docs-testing
matifaliAug 26, 2025
af28c4f
Merge branch 'main' into cat/contrib-docs-testing
matifaliAug 29, 2025
d7e2892
Merge branch 'main' into cat/contrib-docs-testing
DevelopmentCatsSep 10, 2025
276c61a
Merge branch 'main' into cat/contrib-docs-testing
DevelopmentCatsOct 1, 2025
3920709
fix(examples): standardize module naming from MODULE_NAME to module_n…
DevelopmentCatsOct 1, 2025
7cefd58
chore: resolve index issue with claude-code tf test
DevelopmentCatsOct 1, 2025
32f2e05
Merge branch 'main' into cat/contrib-docs-testing
DevelopmentCatsOct 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some comments aren't visible on the classic Files Changed page.

2 changes: 2 additions & 0 deletions.github/workflows/ci.yaml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,6 +28,8 @@ jobs:
run: bun install
- name: Run TypeScript tests
run: bun test
- name: Run Terraform tests
run: ./scripts/terraform_test_all.sh
- name: Run Terraform Validate
run: bun terraform-validate
validate-style:
Expand Down
24 changes: 16 additions & 8 deletionsCONTRIBUTING.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -124,18 +124,24 @@ 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`
- **TypeScript tests**: Create `main.test.ts` files if your module runs scripts or has business logic that Terraform tests can't cover
- **Both approaches** are supported
4. **Add any scripts** or additional files your module needs

### 4. Test and Submit

```bash
# Test your module (from the module directory)
# Test your module
cd registry/[namespace]/modules/[module-name]

# Required: Test Terraform functionality
terraform init -upgrade
terraform test -verbose

#Or run all tests in the repo
./scripts/terraform_test_all.sh
#Optional: Test TypeScript files if you have main.test.ts
bun test main.test.ts

# Format code
bun run fmt
Expand DownExpand Up@@ -343,8 +349,8 @@ coder templates push test-[template-name] -d .
terraform init -upgrade
terraform test -verbose

#Test all modules
./scripts/terraform_test_all.sh
#Optional: If you have TypeScript tests
bun test main.test.ts
```

### 3. Maintain Backward Compatibility
Expand DownExpand Up@@ -393,7 +399,9 @@ Example: `https://github.com/coder/registry/compare/main...your-branch?template=
### Every Module Must Have

- `main.tf` - Terraform code
- One or more `.tftest.hcl` files - Working tests with `terraform test`
- **Tests**:
- `*.tftest.hcl` files with `terraform test` (to test terraform specific logic)
- `main.test.ts` file with `bun test` (to test business logic, i.e., `coder_script` to install a package.)
- `README.md` - Documentation with frontmatter

### Every Template Must Have
Expand DownExpand Up@@ -493,6 +501,6 @@ When reporting bugs, include:
2. **No tests** or broken tests
3. **Hardcoded values** instead of variables
4. **Breaking changes** without defaults
5. **Not running** formatting (`bun run fmt`) and tests (`terraform test`) before submitting
5. **Not running** formatting (`bun run fmt`) and tests (`terraform test`, and `bun test main.test.ts` if applicable) before submitting

Happy contributing! 🚀
Loading

[8]ページ先頭

©2009-2025 Movatter.jp