Skip to content

fix(cmd): stabilize cwd validation test in CI - #15

Merged
louiss0 merged 26 commits into
mainfrom
dev
May 23, 2026
Merged

louiss0 merged 26 commits into
mainfrom
dev

Conversation

@louiss0

@louiss0 louiss0 commented May 21, 2026

Copy link
Copy Markdown
Owner

Why

The --cwd validation spec was flaky in CI on POSIX runners.
When CI relaxes trailing-slash validation, the test continued into target
directory resolution and failed on stat /tmp/my-project instead of
asserting the intended validation behavior.

What

  • update the failing --cwd root command spec to use a real temporary
    directory on POSIX runners
  • keep the Windows-path assertion behavior unchanged

How

The test now creates a temporary directory for the POSIX invalid-path
case, strips the trailing slash via filepath.ToSlash, and exercises
the same command path under CI and local modes.

Breaking changes

  • None

Tests

  • go test ./cmd
  • go test -ldflags="-X github.com/louiss0/javascript-package-delegator/build_info.rawCI=true" ./cmd

Checklist

  • Commits follow the project's Conventional Commit rules (type(scope): subject; imperative, <= 64 chars)
  • Changes are atomic, buildable, and tests pass locally (go test ./...)
  • New/updated tests are included for new behavior
  • Documentation updated where applicable
  • CI passes after pushing
  • Linked issue referenced, if applicable (e.g., Closes #123)
  • Git Flow: feature branches target develop (use git flow feature start <name>)

@louiss0
louiss0 merged commit 5433906 into main May 23, 2026
10 checks passed
@louiss0

louiss0 commented May 23, 2026

Copy link
Copy Markdown
Owner Author

🔀 Merge Summary

Strategy squash
Branch dev → main
Commits 26
Changed files 27
Diff +714 −294
📁 Changed files
  • .github/workflows/ci.yml (+17 −56)
  • .github/workflows/release.yml (+14 −3)
  • .gitignore (+1 −1)
  • README.adoc (+5 −3)
  • cmd/carapace.go (+110 −0)
  • cmd/cmd_test.go (+11 −11)
  • cmd/completion.go (+1 −25)
  • cmd/completion_integrate_ginkgo_test.go (+89 −1)
  • cmd/integrate.go (+4 −1)
  • cmd/release_render_env/main.go (+49 −0)
  • cmd/release_render_env/main_test.go (+39 −0)
  • cmd/start.go (+10 −5)
  • cmd/uninstall.go (+29 −43)
  • docs/src/content/docs/how-to/completion.mdx (+20 −11)
  • docs/src/content/docs/index.mdx (+2 −2)
  • docs/src/content/docs/reference/commands.mdx (+12 −4)
  • docs/src/content/docs/tutorial/getting-started.mdx (+4 −7)
  • go.mod (+1 −1)
  • goreleaser.yaml (+4 −0)
  • internal/deps/deps_test.go (+46 −15)
  • internal/deps/extract.go (+30 −18)
  • internal/deps/hash.go (+8 −14)
  • internal/deps/store.go (+29 −0)
  • internal/render_env/pkg.go (+85 −0)
  • internal/render_env/render_env_test.go (+76 −0)
  • mock/pkg.go (+18 −34)
  • scripts/cleanup.sh (+0 −39)

@louiss0
louiss0 deleted the dev branch May 23, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant