Skip to content

chore(ci): remove redundant test work#109

Merged
morluto merged 2 commits into
mainfrom
chore/optimize-ci-followup
Jul 22, 2026
Merged

chore(ci): remove redundant test work#109
morluto merged 2 commits into
mainfrom
chore/optimize-ci-followup

Conversation

@morluto

@morluto morluto commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Description

Remove redundant CI work and shorten isolated repository tests using Go's built-in scheduler.

PR #108 made cached tests the default local loop and separated expensive validation. Profiling its green CI run showed that the complete Go suite still ran twice on Linux: once as a plain matrix job and once with coverage. The plain Linux job took 81 seconds but did not exercise a distinct platform or mode. Profiling local tests also showed independent temp-repository fixtures running serially in the two slowest relevant packages.

This follow-up:

  • lets the coverage job provide the complete Linux test run while retaining macOS and Windows behavior checks;
  • cancels superseded runs on the same pull request or branch;
  • routes formatting, coverage, race, tidiness, generated-output, and documentation jobs through their Make targets so local and CI behavior cannot drift;
  • removes verbose coverage output and allows Go to reuse valid cached coverage results for unchanged packages;
  • updates pre-commit system hooks to the current unsupported language name and reuses make test at pre-push;
  • runs app and workspace tests in parallel only where each test owns its temporary database, repository, server, and subprocess environment;
  • includes internal/workspace in focused race validation now that its fixtures execute concurrently.

Coverage, focused race detection, cross-platform tests, generated-output checks, linting, and security analysis remain required.

Suggested review order

  1. CI and hook orchestration in .github/workflows/ci.yml, .pre-commit-config.yaml, and Makefile.
  2. Isolated app fixtures marked parallel in the four changed app test files.
  3. Temporary-repository isolation in internal/workspace/workspace_test.go.

Testing

  • make verify (45.94 seconds)
  • make test-uncached (30.43 seconds)
  • make cover-check (72.9%, 41.20 seconds)
  • make test-race (app, corpus, and workspace)
  • Repeated shuffled race runs for every newly parallelized test group
  • pre-commit run --all-files
  • pre-commit validate-config .pre-commit-config.yaml
  • actionlint .github/workflows/ci.yml

Performance evidence

  • The removed duplicate Linux job took 81 seconds in the last green run.
  • The uncached local suite fell from 46.33 seconds to 30.43 seconds (34%).
  • internal/workspace fell from 5.16 seconds to about 1.29 seconds per run across ten repetitions (75%).
  • An identical cached local suite rerun completes in 1.16 seconds.
  • Superseded CI runs now stop automatically instead of consuming the full matrix.

Compatibility and scope

No product code, public behavior, dependencies, coverage threshold, or platform coverage changes are included. Tests that mutate process environment remain serial.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@morluto
morluto merged commit c676b73 into main Jul 22, 2026
13 checks passed
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