Compare commits
1 Commits
fix/issue-
...
fix/ci-a11
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
91df6951f7 |
@@ -9,21 +9,37 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Validate ARIA Attributes in JS
|
||||
|
||||
- name: Validate ARIA attributes in JS
|
||||
run: |
|
||||
echo "Checking js/*.js for ARIA attributes..."
|
||||
grep -rq "aria-label" js/ || (echo "ERROR: aria-label missing from js/" && exit 1)
|
||||
grep -rq "aria-pressed" js/ || (echo "ERROR: aria-pressed missing from js/" && exit 1)
|
||||
|
||||
- name: Validate ARIA Roles in index.html
|
||||
MISSING=0
|
||||
for attr in aria-label aria-pressed; do
|
||||
if ! grep -rq "$attr" js/*.js; then
|
||||
echo "ERROR: $attr missing from js/*.js"
|
||||
MISSING=1
|
||||
fi
|
||||
done
|
||||
if [ "$MISSING" -eq 0 ]; then
|
||||
echo "PASS: ARIA attributes present in JS"
|
||||
fi
|
||||
exit $MISSING
|
||||
|
||||
- name: Validate ARIA roles in index.html
|
||||
run: |
|
||||
echo "Checking index.html for ARIA roles..."
|
||||
grep -q "role=" index.html || (echo "ERROR: No ARIA roles found in index.html" && exit 1)
|
||||
|
||||
- name: Syntax Check JS
|
||||
grep -q 'role=' index.html || (echo "ERROR: No ARIA roles found in index.html" && exit 1)
|
||||
grep -q 'aria-label' index.html || (echo "ERROR: No aria-label found in index.html" && exit 1)
|
||||
echo "PASS: ARIA roles and labels present in index.html"
|
||||
|
||||
- name: Syntax check JS
|
||||
run: |
|
||||
echo "Running node -c on js/*.js..."
|
||||
FAIL=0
|
||||
for f in js/*.js; do
|
||||
echo "Syntax check: $f"
|
||||
node -c "$f" || exit 1
|
||||
node -c "$f" || FAIL=1
|
||||
done
|
||||
if [ "$FAIL" -eq 0 ]; then
|
||||
echo "PASS: All JS files parse"
|
||||
fi
|
||||
exit $FAIL
|
||||
|
||||
@@ -20,5 +20,5 @@ jobs:
|
||||
echo "PASS: All files parse"
|
||||
- name: Secret scan
|
||||
run: |
|
||||
if grep -rE 'sk-or-|sk-ant-|ghp_|AKIA' . --include='*.yml' --include='*.py' --include='*.sh' 2>/dev/null | grep -v '.gitea' | grep -v 'guardrails'; then exit 1; fi
|
||||
if grep -rE 'sk-or-|sk-ant-|ghp_|AKIA' . --include='*.yml' --include='*.py' --include='*.sh' 2>/dev/null | grep -v .gitea; then exit 1; fi
|
||||
echo "PASS: No secrets"
|
||||
|
||||
Reference in New Issue
Block a user