A11y - Add Pa11y CI in main pipeline to collect a11y issues (#37741)

Co-authored-by: 
Hugo Häggmark <hugo.haggmark@gmail.com>
thisisobate <obasiuche62@gmail.com>
This commit is contained in:
Maria Alexandra
2021-08-23 10:08:01 +02:00
committed by GitHub
parent 9e8035ef30
commit b579a707e3
7 changed files with 327 additions and 20 deletions

View File

@@ -2,6 +2,7 @@
set -e
ERROR_COUNT="$(./node_modules/.bin/tsc --project tsconfig.json --noEmit --strict true | grep -oP 'Found \K(\d+)')"
ACCESSIBILITY_ERRORS="$(grep -oP '\"errors\":(\d+),' pa11y-ci-results.json | grep -oP '\d+')"
DIRECTIVES="$(grep -r -o directive public/app/ | wc -l)"
CONTROLLERS="$(grep -r -oP 'class .*Ctrl' public/app/ | wc -l)"
STORIES_COUNT="$(find ./packages/grafana-ui/src/components -name "*.story.tsx" | wc -l)"
@@ -19,6 +20,7 @@ MED_VULNERABILITIES="$(echo "${VULNERABILITY_AUDIT}" | sed -n '2p')"
HIGH_VULNERABILITIES="$(echo "${VULNERABILITY_AUDIT}" | sed -n '3p')"
echo -e "Typescript errors: $ERROR_COUNT"
echo -e "Accessibility errors: $ACCESSIBILITY_ERRORS"
echo -e "Directives: $DIRECTIVES"
echo -e "Controllers: $CONTROLLERS"
echo -e "Stories: $STORIES_COUNT"