From c0f1b370e303dbc01d4a8479a0a14a6b87ef1e15 Mon Sep 17 00:00:00 2001 From: chenshuai2144 Date: Thu, 9 Jul 2020 14:21:46 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20CI:=20add=20coverage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 6 ++++-- package.json | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fe43feb9..fa032d10 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,5 +13,7 @@ jobs: - name: lint run: npm run lint && npm run tsc - - name: test - run: npm run test + - name: test + run: npm run test:coverage + - name: Generate coverage + run: bash <(curl -s https://codecov.io/bash) diff --git a/package.json b/package.json index 3e2855fa..3bbe8905 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "site_build": "dumi build", "doc": "cd ./example && umi dev", "test": "umi-test", + "test:coverage": "umi-test --coverage", "tsc": "tsc -p tsconfig-check.json" }, "husky": {