Skip to content

Commit

Permalink
chrome driver path
Browse files Browse the repository at this point in the history
  • Loading branch information
IsraelleHub committed Jul 31, 2024
1 parent 199bacf commit d20f1cf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/documentation_accessibility_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
node-version-file: 'VAMobile/.nvmrc'
cache: yarn
cache-dependency-path: VAMobile/yarn.lock
- name: Install ChromeDriver
run: npm install -g [email protected]
- name: Test build
working-directory: VAMobile
run: |
Expand All @@ -55,14 +57,14 @@ jobs:

# Extract URLs from sitemap and iterate
for url in $(grep -o '<loc>[^<]*' "$sitemap_path" | sed 's/<loc>//'); do
if axe --chrome-options="no-sandbox,disable-setuid-sandbox,disable-dev-shm-usage,window-size=1920,1080,ignore-certificate-errors,ignore-ssl-errors,disable-gpu" --timeout=300000 "$url" --exit; then
if axe "$url" --chromedriver-path $(npm root -g)/chromedriver/bin/chromedriver --exit; then
echo "No accessibility issues found in $url"
else
echo "Accessibility issues found in $url"
echo "$url" >> accessibility_issues.txt

# Extract number of issues from axe output
issues=$(axe --chrome-options="no-sandbox,disable-setuid-sandbox,disable-dev-shm-usage,window-size=1920,1080,ignore-certificate-errors,ignore-ssl-errors,disable-gpu" "$url" | grep -oP '\d+ Accessibility issues detected' | grep -oP '\d+')
issues=$(axe --chrome-options="no-sandbox,disable-setuid-sandbox,disable-dev-shm-usage" "$url" | grep -oP '\d+ Accessibility issues detected' | grep -oP '\d+')
if [ -n "$issues" ]; then
num_issues=$((num_issues + issues))
fi
Expand All @@ -84,6 +86,7 @@ jobs:

start_slack_thread:
name: Start Slack thread
if: ${{ failure() }}
needs: axe-scan
uses: ./.github/workflows/start_slack_thread.yml
secrets: inherit
Expand Down

0 comments on commit d20f1cf

Please sign in to comment.