mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 13:08:31 +02:00
add junit annotations
This commit is contained in:
parent
7251cda893
commit
01b4165dfb
2 changed files with 12 additions and 4 deletions
12
.github/workflows/docs.yaml
vendored
12
.github/workflows/docs.yaml
vendored
|
@ -7,7 +7,7 @@ on:
|
||||||
branches: [ develop ]
|
branches: [ develop ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
accessibility:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -32,7 +32,7 @@ jobs:
|
||||||
pip install poetry
|
pip install poetry
|
||||||
poetry config --local virtualenvs.in-project true
|
poetry config --local virtualenvs.in-project true
|
||||||
poetry install --no-root --remove-untracked
|
poetry install --no-root --remove-untracked
|
||||||
npm install pa11y
|
npm install pa11y pa11y-reporter-junit
|
||||||
|
|
||||||
- name: Start docs server
|
- name: Start docs server
|
||||||
run: poetry run mkdocs serve &
|
run: poetry run mkdocs serve &
|
||||||
|
@ -40,3 +40,11 @@ jobs:
|
||||||
- name: Accessibility testing (Pa11y)
|
- name: Accessibility testing (Pa11y)
|
||||||
run: poetry run .github/workflows/pa11y.sh
|
run: poetry run .github/workflows/pa11y.sh
|
||||||
|
|
||||||
|
- name: Junit Report to Annotations
|
||||||
|
uses: ashley-taylor/junit-report-annotations-action@1.3
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
access-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
path: reports/pa11y/*.xml
|
||||||
|
includeSummary: true
|
||||||
|
numFailures: 10
|
||||||
|
|
4
.github/workflows/pa11y.sh
vendored
4
.github/workflows/pa11y.sh
vendored
|
@ -9,11 +9,11 @@ mkdocs build
|
||||||
mkdir -p "$reports_dir"
|
mkdir -p "$reports_dir"
|
||||||
|
|
||||||
printf -- 'scanning: /\n'
|
printf -- 'scanning: /\n'
|
||||||
./node_modules/.bin/pa11y "$site_url" || exit_code=2
|
./node_modules/.bin/pa11y "$site_url" --reporter junit > "$reports_dir/root.xml" || exit_code=2
|
||||||
|
|
||||||
for file in $(xq '.urlset.url[].loc' site/sitemap.xml -r | sed -r 's!https://jrnl.sh/(.*?)/$!\1!'); do
|
for file in $(xq '.urlset.url[].loc' site/sitemap.xml -r | sed -r 's!https://jrnl.sh/(.*?)/$!\1!'); do
|
||||||
printf -- 'scanning: /%s\n' "$file"
|
printf -- 'scanning: /%s\n' "$file"
|
||||||
./node_modules/.bin/pa11y "$site_url/$file" || exit_code=2
|
./node_modules/.bin/pa11y "$site_url/$file" --reporter junit > "$reports_dir/$file.xml" || exit_code=2
|
||||||
done
|
done
|
||||||
|
|
||||||
exit $exit_code
|
exit $exit_code
|
||||||
|
|
Loading…
Add table
Reference in a new issue