Skip to content

Commit

Permalink
DPC-4438 Check static site for 508 compliance via github actions (#133)
Browse files Browse the repository at this point in the history
## 🎫 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
  • Loading branch information
jdettmannnava authored Dec 30, 2024
1 parent edf54fd commit 422b0df
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/check_508_compliance.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 422b0df

Please sign in to comment.