From 14887c9b97394882a8ccc63105c3493873e2b735 Mon Sep 17 00:00:00 2001 From: CountBleck Date: Sun, 8 Oct 2023 16:20:43 -0700 Subject: [PATCH] Add a coverage job to CI This new job is very barebones at the moment. It only outputs a summary of the coverage in the terminal, since the entire coverage is a bit long and unwieldy. Perhaps Codecov or similar can be used in the future. --- .github/workflows/test.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 70c5ae7442..45b1fb1f2e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -127,3 +127,20 @@ jobs: cd lib/loader npm run asbuild npm run test + coverage: + name: "Coverage" + runs-on: ubuntu-latest + needs: check + steps: + - uses: actions/checkout@v3 + - uses: dcodeIO/setup-node-nvm@master + with: + node-version: current + - name: Install dependencies + run: npm ci --no-audit + - name: Build + run: npm run build + - name: Collect coverage + run: npm run coverage -r none + - name: Output coverage summary + run: npx c8 report -r text-summary