chore: add turborepo task configuration#129
Open
CorieW wants to merge 4 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a baseline Turborepo configuration to orchestrate common workspace tasks (build, lint, typecheck, test, and persistent dev) and adds root-level helper scripts plus the turbo devDependency to run those tasks from the repo root.
Changes:
- Added root
turbo.jsondefining task graph dependencies, caching behavior, and declared build outputs. - Added
turbo:*helper scripts to the rootpackage.jsonfor running task pipelines. - Added
turbo(^2.5.4) to rootdevDependencies.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| turbo.json | Adds Turborepo task definitions, caching flags, and output globs. |
| package.json | Adds turbo scripts and the turbo devDependency for local execution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+6
to
+7
| "outputs": ["dist/**", "docs/.vitepress/dist/**"] | ||
| }, |
Comment on lines
141
to
+147
| "tailwindcss": "^4.2.2", | ||
| "typescript": "^5.7.2", | ||
| "typescript-eslint": "^8.58.1", | ||
| "vite": "^7.1.7", | ||
| "vitepress": "^1.6.4", | ||
| "vitest": "^3.2.4" | ||
| "vitest": "^3.2.4", | ||
| "turbo": "^2.5.4" |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (3)
.github/workflows/upload-coverage.yml:46
- Running coverage via
pnpm turbo:test -- -- --coveragewill executetestin every workspace package. In this repo, packagetestscripts point at the sharedconfig/vite.config.tswhich already includespackages/**tests, so this can re-run the same test suite multiple times and makes the expected single./coverage/lcov.infooutput less reliable. Prefer the existing single-runpnpm test:coverage, or filter Turbo to only the root package when generating coverage so the artifacts match the hard-coded./coverage/*paths.
- name: Run tests with coverage
run: pnpm turbo:test -- -- --coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
disable_search: true
.github/workflows/pr-coverage.yml:51
pnpm turbo:test -- -- --coveragewill runtestacross all workspaces. Because the package-leveltestscripts use the sharedconfig/vite.config.ts(which already includespackages/**), this can cause duplicate full-suite runs and may not reliably produce a single./coverage/coverage-*.jsonat the paths expected by the vitest coverage report action. Consider usingpnpm test:coveragehere, or filter Turbo to only the root package when generating coverage artifacts.
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run tests with coverage
run: pnpm turbo:test -- -- --coverage
- name: Report Coverage
uses: davelosert/vitest-coverage-report-action@v2
with:
json-summary-path: './coverage/coverage-summary.json'
json-final-path: './coverage/coverage-final.json'
.github/workflows/ci.yml:246
pnpm turbo:test -- -- --runwill executetestin every workspace. The packagetestscripts reference the sharedconfig/vite.config.ts, whosetest.includealready matches bothsrc/**andpackages/**, so Turbo will re-run the full workspace test suite multiple times. Consider running the single rootpnpm test -- --run(or filtering Turbo to the root package) to avoid duplicated work and reduce flakiness risk.
- name: Run tests
run: pnpm turbo:test -- -- --run
Comment on lines
+146
to
+147
| "vitest": "^3.2.4", | ||
| "turbo": "^2.5.4" |
| "turbo:build": "turbo run build", | ||
| "turbo:lint": "turbo run lint", | ||
| "turbo:test": "turbo run test", | ||
| "turbo:typecheck": "turbo run typecheck" |
| "tasks": { | ||
| "build": { | ||
| "dependsOn": ["^build"], | ||
| "outputs": ["dist/**", "docs/.vitepress/dist/**"] |
|
|
||
| - name: Type check | ||
| run: pnpm typecheck | ||
| run: pnpm turbo:typecheck |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
build,lint,typecheck,test, and persistentdevtasks across packages.Description
turbo.jsonwith task definitions forbuild,lint,typecheck,test, and a non-cached persistentdevtask and appropriateoutputsfor caching.package.json(turbo,turbo:build,turbo:lint,turbo:test,turbo:typecheck).turboto rootdevDependencies(^2.5.4) so the scripts can be run via local tooling.Testing
turbowithpnpm add -Dw turbo@^2.5.4, which failed withERR_PNPM_FETCH_403due to registry authorization restrictions in this environment.pnpm turbo --version, which failed becauseturbois not installed after the fetch failure.git commit(commit message:chore: add turborepo task configuration).Codex Task