From 2e67a7f4244377de6ca30d9bb908e0cdd09d3b5a Mon Sep 17 00:00:00 2001 From: Wes Dean Date: Wed, 7 Aug 2024 14:34:48 -0400 Subject: [PATCH 1/3] Refactor around GHA and npm pinning --- .github/workflows/pa11y.yml | 4 ++-- .github/workflows/test.yml | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pa11y.yml b/.github/workflows/pa11y.yml index 807055e0..00f8c42b 100644 --- a/.github/workflows/pa11y.yml +++ b/.github/workflows/pa11y.yml @@ -37,8 +37,8 @@ jobs: with: node-version: "18" - - name: Install Pa11y - run: npm install pa11y + - name: Install dependencies + run: npm install --production=false - name: Setup custom variables id: customvars diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1485ba56..2fe30e63 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,6 +5,7 @@ name: Build and Test on: pull_request: + permissions: read-all jobs: @@ -20,7 +21,7 @@ jobs: id: nvm - name: Use Node.js (.nvmrc) - uses: actions/setup-node@v3 + uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # pin@v3 with: node-version: "${{ steps.nvm.outputs.NVMRC }}" @@ -29,5 +30,6 @@ jobs: - name: Build site run: npm run build + # - name: Run tests # run: npm run test From 0a94b6b5af11b2772fdc48bb3cca8923e7343b06 Mon Sep 17 00:00:00 2001 From: wesley-dean-gsa Date: Wed, 7 Aug 2024 18:38:07 +0000 Subject: [PATCH 2/3] [MegaLinter] Apply linters fixes --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2fe30e63..af7c0121 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,6 @@ name: Build and Test on: pull_request: - permissions: read-all jobs: @@ -30,6 +29,5 @@ jobs: - name: Build site run: npm run build - # - name: Run tests # run: npm run test From dd86dcfe16cccc2c5357e4b8d6f69a40cef1f509 Mon Sep 17 00:00:00 2001 From: Wes Dean Date: Wed, 7 Aug 2024 14:43:46 -0400 Subject: [PATCH 3/3] Don't let pa11y fail just because of findings --- .github/workflows/pa11y.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pa11y.yml b/.github/workflows/pa11y.yml index 00f8c42b..46b78587 100644 --- a/.github/workflows/pa11y.yml +++ b/.github/workflows/pa11y.yml @@ -71,7 +71,7 @@ jobs: run: "sleep ${{ steps.customvars.outputs.DELAY_SECONDS }}" - name: Execute Pa11y tests - run: npx pa11y "${{ steps.customvars.outputs.BASE_URL }}/${{ steps.customvars.outputs.URL_PATH }}" 2>&1 | tee pa11y_output.txt + run: npx pa11y "${{ steps.customvars.outputs.BASE_URL }}/${{ steps.customvars.outputs.URL_PATH }}" --threshold 999 2>&1 | tee pa11y_output.txt - name: Read pa11y_output file. id: pa11y_output