From 12a862c27702dde7d20ed72d06d80f2899ff5227 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 27 Aug 2023 07:28:04 -0700 Subject: [PATCH 1/3] Bring back unit test coverage report --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75337542..99ca8331 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,6 +72,27 @@ jobs: - name: Lint API run: yarn lint-api + coverage: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + - name: Use Node.js 18.x + uses: actions/setup-node@v3 + with: + node-version: 18.x + cache: 'yarn' + - name: Install dependencies + run: | + yarn --frozen-lockfile + yarn install-addons + - name: Unit test coverage + run: | + yarn test-unit-coverage --forbid-only + EXIT_CODE=$? + ./node_modules/.bin/nyc report --reporter=cobertura + exit $EXIT_CODE + test-unit-parallel: timeout-minutes: 20 strategy: From 03c1906f132625002deb72f933e73f20af16a3a3 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 27 Aug 2023 07:33:46 -0700 Subject: [PATCH 2/3] Have coverage depend on build --- .github/workflows/ci.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99ca8331..e067459a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,20 +72,32 @@ jobs: - name: Lint API run: yarn lint-api - coverage: + test-unit-coverage: + needs: build runs-on: ubuntu-latest timeout-minutes: 10 steps: - uses: actions/checkout@v3 - - name: Use Node.js 18.x + - name: Use Node.js ${{ matrix.node-version }}.x uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: ${{ matrix.node-version }}.x cache: 'yarn' - name: Install dependencies run: | yarn --frozen-lockfile yarn install-addons + - uses: actions/download-artifact@v3 + with: + name: build-artifacts + - name: Unzip artifacts (Linux, macOS) + if: runner.os != 'Windows' + run: unzip -o compressed-build.zip + - name: Unzip artifacts (Windows) + if: runner.os == 'Windows' + run: 7z x compressed-build.zip -aoa -o${{ github.workspace }} + - name: Print directory structure + run: ls -R - name: Unit test coverage run: | yarn test-unit-coverage --forbid-only From 923c28cb7711a266b9ca9bcdced6b988926a4179 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 27 Aug 2023 07:43:11 -0700 Subject: [PATCH 3/3] Use node 18 in coverage --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e067459a..2d3808c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,10 +78,10 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }}.x + - name: Use Node.js 18.x uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node-version }}.x + node-version: 18.x cache: 'yarn' - name: Install dependencies run: |