Skip to content

Speed up tests#901

Merged
Soph merged 4 commits intomainfrom
soph/test-improvements
Apr 9, 2026
Merged

Speed up tests#901
Soph merged 4 commits intomainfrom
soph/test-improvements

Conversation

@Soph
Copy link
Copy Markdown
Collaborator

@Soph Soph commented Apr 9, 2026

Split CI tests into parallel core, integration shards, and canary jobs to cut Actions wall time, and fixed a race in test git-config isolation exposed by the higher integration parallelism.


Note

Low Risk
Low risk production-wise since changes are CI/test-only, but it may affect CI coverage and job stability due to new sharding and parallelism settings.

Overview
CI now runs tests in parallel lanes. The single test job is replaced with test-core, test-integration (matrix-sharded a/b/c), and test-canary, each running dedicated mise tasks with GO_TEST_PARALLEL set.

New mise CI tasks add a non-integration go test -race runner (test:ci:core) and a shard runner (test:ci:integration:shard) that enumerates integration tests and runs a shard-specific -run regex.

Test utility race fix: gitEmptyConfigPath() now uses sync.Once to safely create/reuse the temp empty git config file under higher parallelism.

Reviewed by Cursor Bugbot for commit 990a03b. Configure here.

Copilot AI review requested due to automatic review settings April 9, 2026 14:33
@Soph Soph requested a review from a team as a code owner April 9, 2026 14:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces CI wall time by splitting the test workload into parallel GitHub Actions jobs (core/unit, sharded integration, and an E2E canary) and addresses a race condition in test Git config isolation exposed by increased parallelism.

Changes:

  • Add dedicated CI tasks for core (non-integration) tests and for running integration tests in 3 shards.
  • Update the GitHub Actions workflow to run core, integration shards, and canary jobs in parallel.
  • Fix a data race in GitIsolatedEnv() test helper by guarding temp config creation with sync.Once.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
mise-tasks/test/ci/integration/shard New task to enumerate integration tests and run a selected shard with race detection.
mise-tasks/test/ci/core New task to run non-integration packages under the race detector for CI.
cmd/entire/cli/testutil/testutil.go Make git empty config path initialization concurrency-safe via sync.Once.
.github/workflows/ci.yml Split CI into test-core, test-integration (matrix shards), and test-canary jobs.
Comments suppressed due to low confidence (1)

.github/workflows/ci.yml:15

  • ref: ${{ github.event.pull_request.head.sha }} will be empty/undefined for push and workflow_dispatch events, which can break checkout. Use a fallback like ${{ github.event.pull_request.head.sha || github.sha }} (or omit ref entirely unless the event is pull_request).
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
        with:
          ref: ${{ github.event.pull_request.head.sha }}
      - name: Setup Keyring

Comment thread mise-tasks/test/ci/core Outdated
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
Entire-Checkpoint: 54b335d0b41a
@Soph Soph force-pushed the soph/test-improvements branch from 990a03b to 5113a1e Compare April 9, 2026 14:49
@Soph Soph merged commit 1a071d2 into main Apr 9, 2026
8 checks passed
@Soph Soph deleted the soph/test-improvements branch April 9, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants