Files
dingtalk-workspace-cli/scripts
chichuan bfd0976b31 fix(ci): run the app test partitions as parallel shards
The five internal/app partitions ran end to end inside one job, so the app
shard's wall clock was the sum of all five: 780s in CI, of which the schema
partition owned 357s. Each partition is now its own matrix shard, so they run
concurrently and the shard's wall clock is set by its slowest partition rather
than by their total. Every partition shard still selects the same single
internal/app package, so the impacted-package query maps the shard name back to
app and the partition only chooses which tests run.

The helper gains a partition argument and a list-partitions mode. APP_PARTITIONS
is the single source of truth for the set, and the discovery pass still runs in
every job, so each one independently verifies that the partition patterns cover
every top-level test exactly once before running the one it was asked for.

Two fail-closed checks guard the split, because the helper's own coverage check
can no longer prove the whole package ran once the partitions are separate jobs:

- The helper cross-checks APP_PARTITIONS against the coverage counters in both
  directions, so a counted partition that nothing dispatches and a dispatchable
  partition with no counter both fail instead of silently skipping tests.
- TestCIAppRacePartitionMatrixMatchesHelper pins the workflow's app-<partition>
  shards to list-partitions output in both directions, so a partition cannot
  lose its job while every job stays green.

The discovery loop variable is renamed from partition to spec: it would
otherwise shadow the partition requested on the command line, which run mode
reads after the discovery pass completes.
2026-08-16 22:18:04 +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