From 422b0df25ca38fb675d6629a1e6d445f0d4617ba Mon Sep 17 00:00:00 2001 From: jdettmannnava <145699825+jdettmannnava@users.noreply.github.com> Date: Mon, 30 Dec 2024 10:54:06 -0500 Subject: [PATCH] DPC-4438 Check static site for 508 compliance via github actions (#133) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 🎫 Ticket https://jira.cms.gov/browse/DPC-4438 ## 🛠 Changes Added check_508_compliance workflow. ## ℹ️ Context We are moving our jobs from Jenkins to github actions. This is a clone of [Jenkinsfile.static_site_508_compliance](https://github.com/CMSgov/dpc-ops/blob/main/jenkins_files/Jenkinsfile.static_site_508_compliance) ## 🧪 Validation Forced run worked: https://github.com/CMSgov/dpc-static-site/actions/runs/12380895523 Forced run with failure (running on ubuntu-latest meant it was blocked, so it tested the Cloudfront 403 response): https://github.com/CMSgov/dpc-static-site/actions/runs/12379865142/job/34554969116 --- .github/workflows/check_508_compliance.yml | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/check_508_compliance.yml diff --git a/.github/workflows/check_508_compliance.yml b/.github/workflows/check_508_compliance.yml new file mode 100644 index 0000000..6e3980e --- /dev/null +++ b/.github/workflows/check_508_compliance.yml @@ -0,0 +1,34 @@ +name: Check 508 Compliance + +on: + schedule: + - cron: 17 8 * * 1 + workflow_dispatch: + inputs: + target_host: + description: Check where? + required: true + default: 'https://stage.dpc.cms.gov' + type: choice + options: + - 'https://stage.dpc.cms.gov' + - 'https://dpc.cms.gov' + +jobs: + compliance_check: + name: Compliance Check + runs-on: self-hosted + steps: + - name: Run Axe Check + env: + TARGET_BASE_URL: ${{ inputs.target_host || 'https://stage.dpc.cms.gov' }} + run: | + TARGETS_TO_SCAN="${TARGET_BASE_URL}" + TARGETS_TO_SCAN="${TARGETS_TO_SCAN} ${TARGET_BASE_URL}/faq.html" + TARGETS_TO_SCAN="${TARGETS_TO_SCAN} ${TARGET_BASE_URL}/data.html" + TARGETS_TO_SCAN="${TARGETS_TO_SCAN} ${TARGET_BASE_URL}/pilot.html" + TARGETS_TO_SCAN="${TARGETS_TO_SCAN} ${TARGET_BASE_URL}/docsV1.html" + TARGETS_TO_SCAN="${TARGETS_TO_SCAN} ${TARGET_BASE_URL}/docsV2.html" + TARGETS_TO_SCAN="${TARGETS_TO_SCAN} ${TARGET_BASE_URL}/updates.html" + docker run --init --rm --cap-add=SYS_ADMIN orenfromberg/axe-puppeteer-ci:1.0.0@sha256:f83527a3ae8ab74088c001abfe44836946ba73f0afbbf460447f8a0c40281e70 $TARGETS_TO_SCAN +