From 79d7cc6d2a15949e016c2048c6061b6d969777ad Mon Sep 17 00:00:00 2001 From: Dan Rose Date: Tue, 14 Mar 2023 13:42:03 -0500 Subject: [PATCH 1/4] Unit test coverage --- .github/workflows/test-all.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index 6338195d02..66cb89dab7 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -59,7 +59,12 @@ jobs: run: nohup Xvfb & echo "DISPLAY=:0" >> $GITHUB_ENV - - run: npm run jest-ci -- --selectProjects unit + - run: npm run jest-ci -- --coverage --selectProjects unit + - name: Upload a Build Artifact + uses: actions/upload-artifact@v3 + with: + name: coverage + path: ${{ github.workspace }}/coverage - run: npm run build-dev if: success() || failure() - run: npm run test-render @@ -83,4 +88,4 @@ jobs: - run: npm ci - run: npm run build-dist - run: npm run jest-ci -- --selectProjects build - if: success() || failure() \ No newline at end of file + if: success() || failure() From d629c728c74202a9e90dbd1de2617818ee2823de Mon Sep 17 00:00:00 2001 From: Dan Rose Date: Tue, 14 Mar 2023 14:01:07 -0500 Subject: [PATCH 2/4] rename upload step --- .github/workflows/test-all.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index 66cb89dab7..fd4c6fd6ef 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -60,10 +60,10 @@ jobs: nohup Xvfb & echo "DISPLAY=:0" >> $GITHUB_ENV - run: npm run jest-ci -- --coverage --selectProjects unit - - name: Upload a Build Artifact + - name: Upload unit test coverage uses: actions/upload-artifact@v3 with: - name: coverage + name: unit-test-coverage path: ${{ github.workspace }}/coverage - run: npm run build-dev if: success() || failure() From 2d0962706e3648b973f9c34103d6a7072ae583c6 Mon Sep 17 00:00:00 2001 From: Dan Rose Date: Tue, 14 Mar 2023 14:58:32 -0500 Subject: [PATCH 3/4] use my favorite test reporters text reporter provides output in ci log html-spa reporter provides friendly and interactive output --- .github/workflows/test-all.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index fd4c6fd6ef..49459071c8 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -59,7 +59,7 @@ jobs: run: nohup Xvfb & echo "DISPLAY=:0" >> $GITHUB_ENV - - run: npm run jest-ci -- --coverage --selectProjects unit + - run: npm run jest-ci -- --coverage --coverageReporters text html-spa --selectProjects unit - name: Upload unit test coverage uses: actions/upload-artifact@v3 with: From bbcef22f133ef5d74c840d78d68897f277d22ca1 Mon Sep 17 00:00:00 2001 From: Dan Rose Date: Tue, 14 Mar 2023 14:59:40 -0500 Subject: [PATCH 4/4] upload coverage even if unit tests fail --- .github/workflows/test-all.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index 49459071c8..1b44d6c9ad 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -61,6 +61,7 @@ jobs: echo "DISPLAY=:0" >> $GITHUB_ENV - run: npm run jest-ci -- --coverage --coverageReporters text html-spa --selectProjects unit - name: Upload unit test coverage + if: success() || failure() uses: actions/upload-artifact@v3 with: name: unit-test-coverage