From 4d5114d745e2c58b7c32231e8bcc8af291cb1689 Mon Sep 17 00:00:00 2001 From: Silent Cat Date: Sun, 3 Dec 2023 12:43:56 +0700 Subject: [PATCH] add coverage flow --- .github/workflows/coverage.yml | 23 +++++++++++++++++++++++ .github/workflows/publish.yml | 1 + 2 files changed, 24 insertions(+) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..77a7a56 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,23 @@ +name: Code Coverage + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Node.js ${{ matrix.node-version }} + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + - run: yarn + + - name: Run the tests + run: yarn test + + - name: Upload coverage to Codecov + - uses: codecov/codecov-action@v3 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 86cd3d8..d9fcffc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,6 +13,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 16 + - run: yarn - run: yarn test - run: yarn build