diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 34015f88..38dd6e20 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: - name: Setup metrics run: npm ci - name: Check contributions requirements - run: npm test -- ci.test.js --noStackTrace + run: npm run test-contrib env: PR_AUTHOR: ${{ github.event.pull_request.user.login }} - name: Run linter @@ -47,7 +47,7 @@ jobs: - name: Build lowlighter/metrics:${{ github.head_ref || 'master' }} run: docker build -t lowlighter/metrics:$(echo ${{ github.head_ref || 'master' }} | sed 's/\//-/g') . - name: Run tests - run: docker run --entrypoint="" lowlighter/metrics:$(echo ${{ github.head_ref || 'master' }} | sed 's/\//-/g') npm test -- metrics.test.js + run: docker run --entrypoint="" lowlighter/metrics:$(echo ${{ github.head_ref || 'master' }} | sed 's/\//-/g') npm test-metrics # Run CodeQL on branch analyze: diff --git a/package.json b/package.json index 2f072599..cd343d83 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,10 @@ "main": "index.mjs", "scripts": { "start": "node source/app/web/index.mjs", - "test": "jest --runInBand --testPathIgnorePatterns presets.test.js", - "test-presets": "jest --runInBand presets.test.js", + "test": "jest --runInBand", + "test-contrib": "jest --runInBand ci.test.js --noStackTrace", + "test-presets": "jest --runInBand presets.test.js --noStackTrace", + "test-metrics": "jest --runInBand metrics.test.js", "build": "node .github/scripts/build.mjs", "presets": "node .github/scripts/presets_examples.mjs", "quickstart": "node .github/scripts/quickstart/index.mjs",