From 7b8ca143152b576e20a8e6051a2ac09d75e0621c Mon Sep 17 00:00:00 2001 From: Phil Renaud Date: Wed, 4 Dec 2024 09:37:27 -0500 Subject: [PATCH 1/3] Continue-on-error placement was causing failing exams to get a green checkmark --- .github/workflows/test-ui.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-ui.yml b/.github/workflows/test-ui.yml index 5478460877c..8b72f8ddb90 100644 --- a/.github/workflows/test-ui.yml +++ b/.github/workflows/test-ui.yml @@ -36,6 +36,7 @@ jobs: - pre-test runs-on: ${{ endsWith(github.repository, '-enterprise') && fromJSON('["self-hosted", "ondemand", "linux", "type=m7a.2xlarge;m6a.2xlarge"]') || 'ubuntu-latest' }} timeout-minutes: 30 + continue-on-error: true defaults: run: working-directory: ui @@ -61,15 +62,23 @@ jobs: secrets: |- kv/data/teams/nomad/ui PERCY_TOKEN ; - name: ember exam + id: exam env: PERCY_TOKEN: ${{ env.PERCY_TOKEN || secrets.PERCY_TOKEN }} PERCY_PARALLEL_NONCE: ${{ needs.pre-test.outputs.nonce }} run: | yarn exam:parallel --split=${{ matrix.split }} --partition=${{ matrix.partition }} --json-report=test-results/test-results.json - continue-on-error: true + # We have continue-on-error set to true, but we still want to alert the author if + # there are test failures or timeouts. Without it, we'll get errors in our output, + # but the workflow will still succeed / have a green checkmark. - name: Express timeout failure if: ${{ failure() }} run: exit 1 + - name: Check test status + if: steps.exam.outcome != 'success' + run: | + echo "Tests failed or timed out in partition ${{ matrix.partition }}" + exit 1 - name: Upload partition test results if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 From a6946a76f3489a4d8a0de741a77d74b8b666100f Mon Sep 17 00:00:00 2001 From: Phil Renaud Date: Wed, 4 Dec 2024 10:03:48 -0500 Subject: [PATCH 2/3] no-op to trigger ui tests --- ui/app/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/app/index.html b/ui/app/index.html index df5eb739390..9d49fe8a579 100644 --- a/ui/app/index.html +++ b/ui/app/index.html @@ -24,7 +24,6 @@ {{content-for "body"}} - {{content-for "body-footer"}} From b8d6e1c6120f2d529e32e8f5bd2df70147f95c77 Mon Sep 17 00:00:00 2001 From: Phil Renaud Date: Fri, 6 Dec 2024 13:55:39 -0500 Subject: [PATCH 3/3] Maybe I dont need explicit test failure steps after all? --- .github/workflows/test-ui.yml | 24 +++++++++++++----------- ui/app/index.html | 1 + ui/tests/acceptance/clients-list-test.js | 3 ++- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-ui.yml b/.github/workflows/test-ui.yml index 8b72f8ddb90..dd1e6074405 100644 --- a/.github/workflows/test-ui.yml +++ b/.github/workflows/test-ui.yml @@ -10,6 +10,8 @@ on: - test-ui paths: - "ui/**" + - "scripts/combine-ui-test-results.js" + - ".github/workflows/test-ui.yml" jobs: pre-test: @@ -68,17 +70,17 @@ jobs: PERCY_PARALLEL_NONCE: ${{ needs.pre-test.outputs.nonce }} run: | yarn exam:parallel --split=${{ matrix.split }} --partition=${{ matrix.partition }} --json-report=test-results/test-results.json - # We have continue-on-error set to true, but we still want to alert the author if - # there are test failures or timeouts. Without it, we'll get errors in our output, - # but the workflow will still succeed / have a green checkmark. - - name: Express timeout failure - if: ${{ failure() }} - run: exit 1 - - name: Check test status - if: steps.exam.outcome != 'success' - run: | - echo "Tests failed or timed out in partition ${{ matrix.partition }}" - exit 1 + # # We have continue-on-error set to true, but we still want to alert the author if + # # there are test failures or timeouts. Without it, we'll get errors in our output, + # # but the workflow will still succeed / have a green checkmark. + # - name: Express timeout failure + # if: ${{ failure() }} + # run: exit 1 + # - name: Check test status + # if: steps.exam.outcome != 'success' + # run: | + # echo "Tests failed or timed out in partition ${{ matrix.partition }}" + # exit 1 - name: Upload partition test results if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 diff --git a/ui/app/index.html b/ui/app/index.html index 9d49fe8a579..df5eb739390 100644 --- a/ui/app/index.html +++ b/ui/app/index.html @@ -24,6 +24,7 @@ {{content-for "body"}} + {{content-for "body-footer"}} diff --git a/ui/tests/acceptance/clients-list-test.js b/ui/tests/acceptance/clients-list-test.js index 49c53da544d..a2e16e43bf4 100644 --- a/ui/tests/acceptance/clients-list-test.js +++ b/ui/tests/acceptance/clients-list-test.js @@ -44,7 +44,8 @@ module('Acceptance | clients list', function (hooks) { await percySnapshot(assert); - assert.equal(ClientsList.nodes.length, ClientsList.pageSize); + // assert.equal(ClientsList.nodes.length, ClientsList.pageSize); + assert.equal(ClientsList.nodes.length, 31); // deliberate failure assert.ok(ClientsList.hasPagination, 'Pagination found on the page'); const sortedNodes = server.db.nodes.sortBy('modifyIndex').reverse();