Skip to content

feat: support harper-pro distribution in integration tests#38

Draft
Ethan-Arrowood wants to merge 1 commit intomainfrom
fix/integration-tests
Draft

feat: support harper-pro distribution in integration tests#38
Ethan-Arrowood wants to merge 1 commit intomainfrom
fix/integration-tests

Conversation

@Ethan-Arrowood
Copy link
Copy Markdown
Member

Summary

  • integrationTests/fixture.ts: getHarperBinPath() now reads HARPER_DISTRIBUTION env var — defaults to harper, switches to @harperfast/harper-pro (dist/bin/harper.js) when set to harper-pro
  • package.json: new test:integration:harper-pro script sets HARPER_DISTRIBUTION=harper-pro so you can run npm run test:integration:harper-pro (or pass a specific file: npm run test:integration:harper-pro -- integrationTests/next-16.pw.ts)
  • .github/workflows/integration-tests.yml: split the single integration-tests job into two named jobs (integration-tests-harper, integration-tests-harper-pro) each with their own node-version matrix — 3 Node versions × 2 distributions = 6 runners running in parallel, keeping each runner focused; added a distribution workflow_dispatch input for targeted manual runs; workflow remains disabled (if: false on generate-matrix) while the broader CI fix is in progress

Local usage

# Run all tests with harper (default)
npm run test:integration

# Run a single test file with harper
npm run test:integration -- integrationTests/next-16.pw.ts

# Run all tests with harper-pro
npm run test:integration:harper-pro

# Run a single test file with harper-pro
npm run test:integration:harper-pro -- integrationTests/next-16.pw.ts

# Or set the env var directly
HARPER_DISTRIBUTION=harper-pro npx playwright test --config integrationTests/playwright.config.ts integrationTests/next-16.pw.ts

Test plan

  • npm run test:integration resolves to the harper bin (no env var set)
  • npm run test:integration:harper-pro resolves to @harperfast/harper-pro/dist/bin/harper.js
  • Single-file invocation works for both scripts
  • Workflow matrix produces correct artifact name prefixes (harper-logs-harper-* vs harper-logs-harper-pro-*)

🤖 Generated with Claude Code

- fixture.ts reads HARPER_DISTRIBUTION env var to switch between the
  `harper` (default) and `@harperfast/harper-pro` packages when
  resolving the Harper binary path
- add `test:integration:harper-pro` npm script as a convenience wrapper
  that sets HARPER_DISTRIBUTION=harper-pro before running Playwright
- workflow: split integration-tests job into two named jobs
  (integration-tests-harper, integration-tests-harper-pro) each with
  their own Node-version matrix so runners are not overloaded; add a
  `distribution` workflow_dispatch input for targeted manual runs;
  workflow remains disabled (if: false on generate-matrix) while the
  broader CI setup is being fixed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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