From eed6833db33da17aab33e1a0c90233b16fa17a68 Mon Sep 17 00:00:00 2001 From: Sufiyan Date: Wed, 2 Oct 2024 13:40:34 +0530 Subject: [PATCH] Add CI step to upload HTML test report as artifact --- .github/workflows/test.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 79da391..c136cd9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,15 +23,28 @@ jobs: # https://stackoverflow.com/questions/72648487/node-js-16-17-changed-resolution-of-localhost - run: ${{ !startsWith(matrix.os, 'ubuntu') }} || sudo sed -i '/localhost/c\127.0.0.1 localhost' /etc/hosts - run: ${{ !startsWith(matrix.os, 'macos') }} || sudo sed -i '' -e 's/.*localhost.*/127.0.0.1 localhost/g' /etc/hosts + - uses: actions/checkout@v4 + - name: Set up JRE 17 uses: actions/setup-java@v4 with: distribution: "temurin" # See 'Supported distributions' for available options java-version: "17" java-package: "jre" + - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - - run: npm install - - run: npm test + + - name: Run npm install + run: npm install + + - name: Run npm test + run: npm run test + + - name: Upload HTML Test Report + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.os }}-${{ matrix.node-version }}-html-report + path: build/reports/specmatic/html