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
Changes from1 commit
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
PrevPrevious commit
NextNext commit
docs(contributing): clarify testing procedures and requirements
  • Loading branch information
@DevelopmentCats
DevelopmentCats committedAug 25, 2025
commit6a98f831c31df7cd8abba110f5e66cc9c9dd7f09

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

23 changes: 10 additions & 13 deletionsCONTRIBUTING.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -125,26 +125,23 @@ This script generates:
- Correct icon path (usually `../../../../.icons/your-icon.svg`)
- Proper tags that describe your module
3. **Create tests for your module:**
- **New modules**: Create `.tftest.hcl` files and test with `terraform test`
- **Existing modules**:Keep `main.test.ts` filesand test with `bun test`
- **New modules**: Create `*.tftest.hcl` files and test with `terraform test`
- **TypeScript tests**:Create `main.test.ts` filesif 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
# For new modules with .tftest.hcl:
cd registry/[namespace]/modules/[module-name]

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

# For existing modules with main.test.ts:
bun test registry/[namespace]/modules/[module-name]

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

# Format code
bun run fmt
Expand DownExpand Up@@ -352,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@@ -403,7 +400,7 @@ Example: `https://github.com/coder/registry/compare/main...your-branch?template=

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

Expand DownExpand Up@@ -504,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 (`bun test` or `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