docs: add CONTRIBUTING guide and expand README

Add CONTRIBUTING.md for testing, PR checks, and release-please flow; link from
README and AGENTS. Document envc bash sourcing (set -a, source <(...)) for YAML/INI.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-03 10:29:27 +01:00
co-authored by Cursor
parent 2d674de546
commit 36f0ed9b52
3 changed files with 161 additions and 47 deletions
+4 -27
View File
@@ -14,39 +14,16 @@ Convert **env**, **YAML**, **JSON**, and **INI** into nested `map[string]any` an
Breaking changes require a new major SemVer tag (or `/v2` module path if the policy changes).
## Testing policy
## Testing policy, PR checklist, and releases
Follows the eSlider "no synthetic mocks" policy (see [.cursor/rules/no-synthetic-mocks.mdc](.cursor/rules/no-synthetic-mocks.mdc)):
- **Unit tests** — pure inputs for merge, keymap, structconv, env flat-map helpers.
- **`httptest`** — allowed only to test **our** HTTP client behaviour in `internal/source` (not third-party API emulation).
- **Fixtures** — real files under `fixtures/`; `testfixtures` resolves paths from module root.
Human-oriented detail lives in **[CONTRIBUTING.md](CONTRIBUTING.md)** (testing rules,
`go test` / lint commands, Conventional Commits, and the release-please / GoReleaser flow).
Follow that document for any change that will ship in a versioned release.
## Decisions
Architecture Significant Requirements: [docs/asr/README.md](docs/asr/README.md).
## Checklist before release
Local sanity check (CI runs the same on every PR):
```sh
go mod tidy
go vet ./...
go test -race -shuffle=on -count=1 ./...
golangci-lint run --timeout 5m
```
Versioning is **automated via [release-please](https://github.com/googleapis/release-please-action)**
and [GoReleaser](https://goreleaser.com) — do **not** hand-edit version strings or tag manually:
1. Commit using [Conventional Commits](https://www.conventionalcommits.org/)
(`feat:`, `fix:`, `feat!:` for breaking, etc.).
2. `.github/workflows/release-please.yml` opens a release PR on each push to `main`
with the computed next SemVer and an updated `CHANGELOG.md`.
3. Merging that PR creates the `vX.Y.Z` tag. `.github/workflows/release.yml` then runs
GoReleaser to publish cross-platform `envc` binaries and a GitHub Release.
## Related
- `inventar/docs/asr/ASR-0008.md` — Go library module conventions