From 1d1f211d378609a6fd7d688b0fb55608b02a5d37 Mon Sep 17 00:00:00 2001 From: DarkSky Date: Sun, 5 Feb 2023 19:05:43 +0800 Subject: [PATCH] chore: export coverage report --- .github/workflows/tests.yml | 3 +++ package.json | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e6d3e287e8..94444eb35e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -44,6 +44,9 @@ jobs: # NEXT_PUBLIC_FIREBASE_APP_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }} # NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID }} + - name: Collect code coverage report + run: pnpm exec nyc report -t .nyc_output --report-dir .coverage --reporter=lcov + - name: Upload e2e test coverage results uses: codecov/codecov-action@v3 with: diff --git a/package.json b/package.json index 102f2fa4fc..e8733185eb 100644 --- a/package.json +++ b/package.json @@ -14,11 +14,10 @@ "start": "pnpm --filter @affine/app start", "lint": "pnpm --filter @affine/app lint", "test": "playwright test", - "test:coverage": "cross-env COVERAGE=true pnpm test && nyc report -t .nyc_output --report-dir .coverage --reporter=lcov", + "test:coverage": "cross-env COVERAGE=true pnpm test -- --forbid-only", "test:unit": "playwright test --config=playwright.config.unit.ts", "postinstall": "husky install", "notify": "node --experimental-modules scripts/notify.mjs", - "check:ci": "pnpm lint & pnpm test", "update:blocksuite": "pnpm i --filter @affine/app --filter @affine/datacenter @blocksuite/blocks@nightly @blocksuite/store@nightly && pnpm i --filter @affine/app @blocksuite/editor@nightly" }, "lint-staged": {