From c44a717f60d76d4c40526fe57aa673ca5a6f3643 Mon Sep 17 00:00:00 2001 From: Birm Date: Mon, 17 Feb 2025 23:28:09 -0500 Subject: [PATCH 1/3] test a11y test as warn not fail --- .github/workflows/axe-a11y-check.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/axe-a11y-check.yml b/.github/workflows/axe-a11y-check.yml index 7c6058049..7638cf67e 100644 --- a/.github/workflows/axe-a11y-check.yml +++ b/.github/workflows/axe-a11y-check.yml @@ -1,4 +1,5 @@ name: axe + on: push: branches: @@ -8,6 +9,7 @@ on: branches: - master - develop + jobs: axe: runs-on: ubuntu-latest @@ -27,7 +29,12 @@ jobs: - name: Install specific version of ChromeDriver run: npm install -g chromedriver@125 - name: Run axe + id: axe-test run: | npm install -g @axe-core/cli sleep 90 - axe http://127.0.0.1:8080 --chromedriver-path $(npm root -g)/chromedriver/bin/chromedriver --exit + axe http://127.0.0.1:8080 --chromedriver-path $(npm root -g)/chromedriver/bin/chromedriver --exit || echo "::set-output name=status::warning" + + - name: Set output status to warning (if test fails) + if: steps.axe-test.outputs.status == 'warning' + run: echo "Accessibility tests failed, but this is an aspirational test and does not block the PR." From ec85b22851b4ec79f615de2e37f27f8d65543025 Mon Sep 17 00:00:00 2001 From: Birm Date: Mon, 17 Feb 2025 23:36:36 -0500 Subject: [PATCH 2/3] try to get explicit warning message --- .github/workflows/axe-a11y-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/axe-a11y-check.yml b/.github/workflows/axe-a11y-check.yml index 7638cf67e..1e00d27c9 100644 --- a/.github/workflows/axe-a11y-check.yml +++ b/.github/workflows/axe-a11y-check.yml @@ -37,4 +37,4 @@ jobs: - name: Set output status to warning (if test fails) if: steps.axe-test.outputs.status == 'warning' - run: echo "Accessibility tests failed, but this is an aspirational test and does not block the PR." + run: echo "::warning Accessibility tests failed, but this does not block (most) PRs." From 67ced4bdc6a5f51c7849661a6249f290a775b39c Mon Sep 17 00:00:00 2001 From: Birm Date: Mon, 17 Feb 2025 23:56:46 -0500 Subject: [PATCH 3/3] different warning syntax, no set status --- .github/workflows/axe-a11y-check.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/axe-a11y-check.yml b/.github/workflows/axe-a11y-check.yml index 1e00d27c9..5a4d93867 100644 --- a/.github/workflows/axe-a11y-check.yml +++ b/.github/workflows/axe-a11y-check.yml @@ -33,8 +33,8 @@ jobs: run: | npm install -g @axe-core/cli sleep 90 - axe http://127.0.0.1:8080 --chromedriver-path $(npm root -g)/chromedriver/bin/chromedriver --exit || echo "::set-output name=status::warning" + axe http://127.0.0.1:8080 --chromedriver-path $(npm root -g)/chromedriver/bin/chromedriver --exit || echo "status=warning" >> $GITHUB_ENV - name: Set output status to warning (if test fails) - if: steps.axe-test.outputs.status == 'warning' - run: echo "::warning Accessibility tests failed, but this does not block (most) PRs." + if: env.status == 'warning' + run: echo "::warning::Accessibility tests failed, but this does not block (most) PRs."