Shared GitHub Actions workflow for integration tests across Harper repos
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
調査の方向性
まず oauth、generic plugin、nextjs、harper-pro、harper リポジトリにある既存の integration-tests GitHub Actions ワークフローを読み、それらに共通するステップと固有のステップを比較します。次に .github/workflows/integration-tests.yml、.github/actions/setup/action.yml、docs/ci.md を評価します。完了条件は、2 つの成果物が存在し、proof of concept として oauth が移行されていることです。
索引モデルが issue の本文から書いたものです。
説明
Idea
Most Harper repos that use the integration-testing framework have nearly identical integration-tests GitHub Actions workflows. Comparing five of them:
| Repo | Node default | Build | Fixtures | Shards | Bespoke extras |
|---|---|---|---|---|---|
| oauth | 22, 24 | ✅ | ✅ | — | none (pure simple tier) |
| generic plugin | 20/22/24 | optional | — | — | none |
| nextjs | 20, 22, 24 | ✅ | ✅ | — | playwright install, harper_ref override, trace artifacts |
| harper-pro | 22, 24, 26 | ✅ | — | 4 | submodules, re2 rebuild, legacy harperdb@4, concurrency cap |
| harper (core) | 22, 24, 26 | ✅ | — | 6 | Windows, Bun, uWS, legacy install |
The common skeleton — matrix generation → checkout → node setup → npm ci → build/fixtures → run test:integration → upload logs on failure — is identical across all of them. Everything that differs lives in the middle steps. That ~60% boilerplate is a good consolidation target; the bespoke middles are not.
Proposed approach: two shared artifacts, hosted here, versioned with the framework
The divergence lives mid-job, and a reusable workflow is all-or-nothing at the job level (you can't inject a step into its middle). So a single mechanism isn't enough — pair two:
-
A reusable workflow (
.github/workflows/integration-tests.yml,on: workflow_call) that owns the entire simple-tier pipeline (matrix gen, setup, run, logs-on-failure). Inputs:node-version/all-node-versions,build,install-fixtures,test-command,timeout-minutes. Callers shrink to ~8 lines. Covers oauth + any plain plugin. -
A composite action (
.github/actions/setup/action.yml) that owns just the shared setup steps (node +npm ci+ optional build/fixtures), dropped into a caller's own job. For repos that must interleave custom steps — nextjs (playwright,harper_ref), harper-pro/core (sharding, native rebuilds). The action deliberately does not checkout (harper-pro needssubmodules: recursive). Caveat: a composite action can't wrap a failure-triggered log upload around the caller's test step, so heavy-tier callers repeat those few lines.
Example: oauth's entire workflow becomes
name: Integration Tests
on:
push: { branches: [main] }
pull_request:
workflow_dispatch:
inputs:
node-version: { type: choice, default: all, options: [all, '22', '24'] }
jobs:
test:
uses: HarperFast/integration-testing/.github/workflows/integration-tests.yml@v1
with:
node-version: ${{ inputs.node-version || 'all' }}
all-node-versions: '[22, 24]'
build: npm run build
install-fixtures: npm run install:fixtures
timeout-minutes: 5
Example: nextjs / harper-pro keep their own job, reuse only setup
steps:
- uses: actions/[email protected]
# with: { submodules: recursive } # harper-pro
- uses: HarperFast/integration-testing/.github/actions/setup@v1
with:
node-version: ${{ matrix.node-version }}
build: npm run build
# --- project-specific middle: playwright / harper_ref / re2 / shards ---
- run: npx playwright install --with-deps chromium
- run: npm run test:integration
env: { HARPER_INTEGRATION_TEST_LOG_DIR: /tmp/harper-test-logs, FORCE_COLOR: '1' }
Where to draw the line
- Use the reusable workflow if your CI is just matrix → build → run → logs (oauth, most future plugins).
- Use only the composite action the moment you need a step in the middle (playwright,
harper_ref, sharding, native rebuilds) — keep your job, dedupe the setup. - harper core stays bespoke — its matrix (Windows × Bun × uWS × 6 shards × legacy install) is divergent enough that routing it through the shared workflow would bury it in conditionals. It can still open each job with the shared setup action.
Open questions / trade-offs to discuss
- Blast radius vs. drift. Consolidation trades N maintained files for one shared surface — a bad change can break every consumer's CI at once. Mitigate by pinning callers to a tag/SHA (never
@main) and versioning the workflow/action alongside the framework release, so CI config and framework move in lockstep. Is that coupling worth it vs. a copy-paste scaffold template (no runtime coupling, but drifts)? - Home. This repo (co-located + versioned with the framework) vs. a shared
HarperFast/.githubrepo. - Scope of inputs. How much variance (playwright toggle? shard count? legacy install?) belongs in the reusable workflow before it's better left to the composite action?
- Secrets. Callers add
secrets: inheritwhen tests need them — worth documenting as a convention.
If we pursue this, next step would be the two files + a short docs/ci.md adoption guide, then converting one simple consumer (oauth) as a proof of concept.
sent with Claude Opus 4.8
- 主要言語
- TypeScript
- スター
- 1
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
HarperFast/integration-testing のほかの issue
-
setupHarperWithFixture overwrites ctx.harper, dropping pre-set hostname (breaks multi-node add_node)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
Detached Harper children are orphaned permanently when the runner dies by SIGKILL/SIGHUP — reap guard only covers exit/SIGINT/SIGTERM再び着手できるかも @kriszyp が 36 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
HarperFast/integration-testing#29 · 担当者 1 名 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
HarperFast/integration-testing の issue をすべて見る
似ている issue
-
docs
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
remix-run/react-router#15558 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
solana-foundation/pay-kit#341 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
supabase/agent-skills#607 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信