Files
dingtalk-workspace-cli/scripts
chichuan ecce09b355 fix(ci): shard the focused test job instead of one long-lived run
The focused path tested every impacted package in a single job with a
plain `go test -race`, so internal/app ran inside one long-lived process
alongside all of its reverse dependencies. That is exactly the shape
scripts/ci/run-app-race-tests.sh exists to avoid: a single app test
process retains every constructed command tree in framework registries,
so the run grows to 900s and the job stays alive long enough to be
reclaimed by the runner. Recent focused runs failed with SIGTERM after
9-10 minutes without a single test failure, and one earlier run failed
at `internal/app 902.651s`, 2.65s past the package timeout.

Fan the same package plan across the shard matrix test-race already
uses, and run each shard the way test-race runs it: internal/app through
the process-isolating helper, cli/smoke with their wider package budget,
release-scripts without race and with archive tooling.

changed-test-packages.sh gains `list-shard`, which intersects the
impacted set with scripts/ci/test-packages.sh shard membership so shard
definitions stay single-sourced — and so an unknown shard name aborts
there rather than reporting an empty selection, which would let a
mistyped shard skip every test while reporting success.

release-scripts is in the matrix on purpose: its dedicated job only runs
at full-suite or release-sensitive scope, so omitting it here would stop
testing test/scripts changes altogether. A test pins that the shard
selections partition the impacted set exactly, so shard-plan drift
cannot silently shrink focused coverage.
2026-08-15 22:10:28 +08:00
..
2026-03-27 17:55:57 +08:00
2026-08-10 10:46:20 +08:00

Go Bootstrap Scripts

These repo-local entrypoints are the supported shell entrypoints for building, testing, packaging, and policy checks.

  • make build: build the dws CLI from cmd
  • make test: run every default package returned by go list ./...
  • make test-plan: verify every default Go package belongs to exactly one CI test shard
  • make lint: run the repository-wide format check, go vet, and required staticcheck
  • make format-check: check every tracked or non-ignored untracked repository Go source file with gofmt
  • make fmt: format every tracked or non-ignored untracked repository Go source file
  • make policy: reuse the current dws binary and run the complete policy suite (make build first)
  • make package: build all release artifacts locally
  • make release-pre VERSION=vX.Y.Z-beta.N: validate a prerelease (PUBLISH=1 pushes its tag)
  • make release-stable VERSION=vX.Y.Z FROM_BETA=vX.Y.Z-beta.N: validate a stable promotion (PUBLISH=1 pushes its tag)

Script groups:

  • Root installers: ./scripts/install.sh, ./scripts/install.ps1, ./scripts/install-skills.sh
  • Product convenience installers: ./scripts/install-devapp.sh, ./scripts/install-devapp.ps1, ./scripts/install-event.sh
  • CI package plan: ./scripts/ci/test-packages.sh
  • Dev helpers: ./scripts/dev/build.sh, ./scripts/dev/lint.sh, ./scripts/dev/ci-local.sh, ./scripts/dev/run-mock-e2e.sh, ./scripts/dev/coverage.sh
  • Policy checks: ./scripts/policy/check-generated-drift.sh, ./scripts/policy/check-command-surface.sh, ./scripts/policy/check-command-compatibility.sh --base-ref <main-ref> --stable-ref <latest-GA-tag> --candidate-ref <candidate-sha>, ./scripts/policy/check-schema-catalog.sh, ./scripts/policy/check-schema-binary.sh, ./scripts/policy/check-open-source-assets.sh
  • Policy runtime files: set DWS_POLICY_TMPDIR to override the default .worktrees/policy-tmp workspace
  • Release entrypoint and contract: ./scripts/release/release.sh, ./scripts/release/release-contract.sh; operator guide: docs/releasing.md
  • Release packaging helpers: ./scripts/release/post-goreleaser.sh, ./scripts/release/stage-npm-package.sh, ./scripts/release/pack-npm-package.sh, ./scripts/release/verify-delivered-stable.sh, ./scripts/release/verify-release-artifacts.sh, ./scripts/release/verify-github-release-assets.sh, ./scripts/release/verify-github-tag-authority.sh, ./scripts/release/verify-package-managers.sh, ./scripts/release/publish-homebrew-formula.sh