ci: enable jscpd duplicate detection and test timing artifact
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
parent
4601a7d3fb
commit
e80e48d122
1 changed files with 11 additions and 1 deletions
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
|
|
@ -116,6 +116,9 @@ jobs:
|
|||
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||
run: bash scripts/require-tests.sh
|
||||
|
||||
- name: Detect copy-paste duplication
|
||||
run: npx jscpd --diff origin/main --threshold 0.05 --ignore '**/*.test.ts' --ignore '**/*.test.mjs' --ignore 'node_modules/**' --ignore 'dist/**' --ignore 'web/**'
|
||||
|
||||
build:
|
||||
timeout-minutes: 15
|
||||
needs: detect-changes
|
||||
|
|
@ -160,7 +163,14 @@ jobs:
|
|||
run: npm run validate-pack
|
||||
|
||||
- name: Run unit tests
|
||||
run: npm run test:unit
|
||||
run: npx vitest run --config vitest.config.ts 2>&1 | tee .artifacts/test-timing.txt
|
||||
|
||||
- name: Upload test timing artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-timing
|
||||
path: .artifacts/test-timing.txt
|
||||
retention-days: 7
|
||||
|
||||
- name: Run package tests
|
||||
run: npm run test:packages
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue