diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d6d45b371e..4bc8f0ce65 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -11,29 +11,33 @@ jobs: build-and-unit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Cache dependencies - uses: actions/cache@v3 - with: - path: ~/.npm - key: npm-${{ hashFiles('package-lock.json') }} - restore-keys: | - npm-${{ hashFiles('package-lock.json') }} - npm- - - name: Install modules - run: | - echo - echo Using Node $(node -v), NPM $(npm -v) - echo - npm ci - - name: Unit Tests & Coverage Report - uses: artiomtr/jest-coverage-report-action@v2.0-rc.4 - env: - CI: true - with: - annotations: none - test-script: npx jest ./packages --silent --ci --json --testLocationInResults --outputFile=report.json --bail --coverage || exit 0 - - name: E2E Tests - run: npm run e2e - env: - CI: true + - uses: actions/checkout@v3 + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ~/.npm + key: npm-${{ hashFiles('package-lock.json') }} + restore-keys: | + npm-${{ hashFiles('package-lock.json') }} + npm- + - name: Install modules + run: | + echo + echo Using Node $(node -v), NPM $(npm -v) + echo + - name: Install dependencies + run: npm ci + env: + CI: true + - name: Typecheck + run: npm run typecheck + - name: Coverage Report + uses: artiomtr/jest-coverage-report-action@v2.0-rc.4 + with: + skip-step: none + annotations: none + test-script: npm run jest -- --silent --ci --json --testLocationInResults --outputFile=report.json --bail --coverage + - name: E2E Tests + run: npm run e2e + env: + CI: true diff --git a/package.json b/package.json index 8835552ff9..aa0fc89748 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "engineStrict": true, "scripts": { "test": "npm run typecheck && npm run unit", - "unit": "jest ./packages --coverage --coverageReporters lcov text-summary", + "jest": "jest ./packages", + "unit": "npm run jest -- --coverage --coverageReporters lcov text-summary", "coverage:cli": "jest --roots packages/cli/src --coverage", "coverage:core": "jest --roots packages/core/src --coverage", "typecheck": "tsc --noEmit --skipLibCheck",