From d69d887007203a8a0663c249d4b17ad711361698 Mon Sep 17 00:00:00 2001 From: microshine Date: Fri, 29 Mar 2024 13:20:15 +0100 Subject: [PATCH] ci: add conditional test coverage for different Node.js versions --- .github/workflows/test.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c517c9c..f41a7d1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,9 +47,14 @@ jobs: - name: Run linter run: npm run lint - - name: Run test with coverage + - name: Run test with coverage for Node.js < 20 + if: ${{ matrix.node-version < 20 }} run: npm run coverage + - name: Run test with coverage for Node.js >= 20 + if: ${{ matrix.node-version >= 20 }} + run: node --security-revert=CVE-2023-46809 ./node_modules/.bin/nyc npm run test + - name: Coveralls uses: coverallsapp/github-action@master with: