-
Notifications
You must be signed in to change notification settings - Fork 2.5k
chore: improve tests #1602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
chore: improve tests #1602
Changes from all commits
290e732
efe7339
c7dff2c
2bdd656
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -173,12 +173,131 @@ jobs: | |
| path: dist/ | ||
| retention-days: 1 | ||
|
|
||
| test: | ||
| name: Test | ||
| timeout-minutes: 15 | ||
| # Detect which packages changed (with dependency awareness) | ||
| detect-changes: | ||
| name: Detect Changes | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| core: ${{ steps.filter.outputs.core }} | ||
| cli: ${{ steps.filter.outputs.cli }} | ||
| mcp: ${{ steps.filter.outputs.mcp }} | ||
| root: ${{ steps.filter.outputs.root }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - uses: dorny/paths-filter@v3 | ||
| id: filter | ||
| with: | ||
| filters: | | ||
| core: | ||
| - 'packages/tm-core/**' | ||
| - 'package-lock.json' | ||
| - 'tsconfig.json' | ||
| - 'vitest.workspace.ts' | ||
cursor[bot] marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
+194
to
+198
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check for vitest config files at repo root
fd -d 1 'vitest' --type fRepository: eyaltoledano/claude-task-master Length of output: 142 Update CI workflow to reference correct vitest config file. Line 198 references 🤖 Prompt for AI Agents |
||
| cli: | ||
| - 'apps/cli/**' | ||
| - 'packages/tm-core/**' | ||
| - 'package-lock.json' | ||
| mcp: | ||
| - 'apps/mcp/**' | ||
| - 'packages/tm-core/**' | ||
| - 'package-lock.json' | ||
| root: | ||
| - 'src/**' | ||
| - 'tests/**' | ||
| - 'package.json' | ||
| - 'package-lock.json' | ||
| - 'jest.config.*' | ||
|
|
||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # Test @tm/core (unit + integration) | ||
| test-core: | ||
| name: Test @tm/core | ||
| timeout-minutes: 10 | ||
| runs-on: ubuntu-latest | ||
| needs: [install, detect-changes, build] | ||
| if: needs.detect-changes.outputs.core == 'true' | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
|
|
||
| - name: Restore node_modules cache | ||
| id: cache-node-modules | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: node_modules | ||
| key: node-modules-${{ runner.os }}-node${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }} | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
| if: steps.cache-node-modules.outputs.cache-hit != 'true' | ||
| timeout-minutes: 5 | ||
|
|
||
| - name: Unit Tests | ||
| run: npm run test:unit -w @tm/core | ||
| env: | ||
| NODE_ENV: test | ||
| CI: true | ||
| FORCE_COLOR: 1 | ||
|
|
||
| - name: Integration Tests | ||
| run: npm run test:integration -w @tm/core | ||
| env: | ||
| NODE_ENV: test | ||
| CI: true | ||
| FORCE_COLOR: 1 | ||
|
|
||
| # Test @tm/cli (unit + integration) | ||
| test-cli: | ||
| name: Test @tm/cli | ||
| timeout-minutes: 10 | ||
| runs-on: ubuntu-latest | ||
| needs: [install, detect-changes, build] | ||
| if: needs.detect-changes.outputs.cli == 'true' | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
|
|
||
| - name: Restore node_modules cache | ||
| id: cache-node-modules | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: node_modules | ||
| key: node-modules-${{ runner.os }}-node${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }} | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
| if: steps.cache-node-modules.outputs.cache-hit != 'true' | ||
| timeout-minutes: 5 | ||
|
|
||
| - name: Unit Tests | ||
| run: npm run test:unit -w @tm/cli | ||
| env: | ||
| NODE_ENV: test | ||
| CI: true | ||
| FORCE_COLOR: 1 | ||
|
|
||
| - name: Integration Tests | ||
| run: npm run test:integration -w @tm/cli | ||
| env: | ||
| NODE_ENV: test | ||
| CI: true | ||
| FORCE_COLOR: 1 | ||
|
|
||
| # Test @tm/mcp (unit + integration) | ||
| test-mcp: | ||
| name: Test @tm/mcp | ||
| timeout-minutes: 10 | ||
| runs-on: ubuntu-latest | ||
| needs: [format-check, typecheck, build, changeset-validation] | ||
| if: always() && !cancelled() && !contains(needs.*.result, 'failure') | ||
| needs: [install, detect-changes, build] | ||
| if: needs.detect-changes.outputs.mcp == 'true' | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
|
|
@@ -194,8 +313,48 @@ jobs: | |
| key: node-modules-${{ runner.os }}-node${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }} | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
| if: steps.cache-node-modules.outputs.cache-hit != 'true' | ||
| timeout-minutes: 5 | ||
|
|
||
| - name: Unit Tests | ||
| run: npm run test:unit -w @tm/mcp | ||
| env: | ||
| NODE_ENV: test | ||
| CI: true | ||
| FORCE_COLOR: 1 | ||
|
|
||
| - name: Integration Tests | ||
| run: npm run test:integration -w @tm/mcp | ||
| env: | ||
| NODE_ENV: test | ||
| CI: true | ||
| FORCE_COLOR: 1 | ||
|
|
||
| # Test root package (legacy Jest tests) | ||
| test-root: | ||
| name: Test Root | ||
| timeout-minutes: 15 | ||
| runs-on: ubuntu-latest | ||
| needs: [format-check, typecheck, build, changeset-validation, detect-changes] | ||
| if: always() && !cancelled() && !contains(needs.*.result, 'failure') && needs.detect-changes.outputs.root == 'true' | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
|
|
||
| - name: Restore node_modules cache | ||
| id: cache-node-modules | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: node_modules | ||
| key: node-modules-${{ runner.os }}-node${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }} | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
| if: steps.cache-node-modules.outputs.cache-hit != 'true' | ||
| timeout-minutes: 5 | ||
|
|
||
| - name: Download build artifacts | ||
|
|
||
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.