-
Notifications
You must be signed in to change notification settings - Fork 4
111 lines (99 loc) · 3.84 KB
/
ci.yml
File metadata and controls
111 lines (99 loc) · 3.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Check for broken links and accessibility issues
on:
# Run daily at 9:00 AM
schedule:
- cron: '0 9 * * *'
# Run on PRs to main
pull_request:
branches: [ main ]
# Allow manual triggering
workflow_dispatch:
jobs:
validate-plugin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Valideer plugin.json
run: python3 -c "import json; json.load(open('.plugin/plugin.json'))"
- name: Controleer plugin sync
run: python3 scripts/generate_plugin.py --check
check-links:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
# Excluded URLs:
# - rijksportaal.overheid-i.nl: Internal government portal
# - rijkscloud.nl: Restricted API access
# - bio-overheid.nl/ico-wizard: Returns 403 for automated checkers but works for users
# - Sites blocking automated link checkers (415/connection refused):
# gebruikercentraal.nl, nldesignsystem.nl, digitaleoverheid.nl,
# gebruikersonderzoeken.nl, digitoegankelijk.nl, usmwiki.com,
# rijksoverheid.nl, wetten.overheid.nl, dutchcloudcommunity.nl
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2.8.0
with:
# Target specific files and improve the arguments
args: >-
--verbose
--no-progress
--exclude-loopback
--exclude "file:///.*/issues.*"
--exclude "file:///home/runner/work/.*"
--exclude "https://rijksportaal.overheid-i.nl/.*"
--exclude "https://rijkscloud.nl/.*"
--exclude "https://bio-overheid.nl/ico-wizard"
--exclude "https://dutchcloudcommunity\.nl/.*"
--exclude "https://.*gebruikercentraal\.nl/.*"
--exclude "https://.*nldesignsystem\.nl/.*"
--exclude "https://gebruikersonderzoeken\.nl/.*"
--exclude "https://kennisbank\.digitoegankelijk\.nl/.*"
--exclude "https://usmwiki\.com/.*"
--exclude "https://www\.digitaleoverheid\.nl/.*"
--exclude "https://www\.rijksoverheid\.nl/.*"
--exclude "https://wetten\.overheid\.nl/.*"
'**/*.yaml'
'**/*.md'
'**/*.ts'
'**/*.vue'
# Output file for creating issues
output: ./lychee/out.md
# Only create an issue when broken links are found AND running on schedule/manual
- name: Create Issue (Only on schedule or manual run)
if: ${{ failure() && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
uses: peter-evans/create-issue-from-file@v6
with:
title: Broken links detected
content-filepath: ./lychee/out.md
labels: broken-links
accessibility-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '18'
- name: Install Pa11y tools
run: npm install -g pa11y-ci
- name: Test all pages with sitemap
run: |
mkdir -p reports
pa11y-ci --sitemap https://minbzk.github.io/NeRDS/sitemap.xml \
--reporter json \
--output reports/a11y-report.json || echo "Issues found"
- name: Upload results
if: always()
uses: actions/upload-artifact@v7
with:
name: accessibility-reports
path: reports/
retention-days: 7
- name: Create issue on failure
if: failure() && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
uses: peter-evans/create-issue-from-file@v6
with:
title: Accessibility issues detected across site
content-filepath: ./reports/a11y-report.json
labels: accessibility