Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/jobs/webstandard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ROLE="$2"
cd /opt/domjudge/domserver

section_start "Setup pa11y"
pa11y --version
/home/domjudge/node_modules/.bin/pa11y --version
section_end

section_start "Setup the test user"
Expand Down Expand Up @@ -143,8 +143,8 @@ else
for file in $(find $URL -name "*.html")
do
section_start "$file"
su domjudge -c "pa11y --config .github/jobs/pa11y_config.json $STAN -r json -T $ACCEPTEDERR $FLTR $file" | python3 -m json.tool
ERR=$(su domjudge -c "pa11y --config .github/jobs/pa11y_config.json $STAN -r csv -T $ACCEPTEDERR $FLTR $file" | wc -l)
su domjudge -c "/home/domjudge/node_modules/.bin/pa11y --config .github/jobs/pa11y_config.json $STAN -r json -T $ACCEPTEDERR $FLTR $file" | python3 -m json.tool
ERR=$(su domjudge -c "/home/domjudge/node_modules/.bin/pa11y --config .github/jobs/pa11y_config.json $STAN -r csv -T $ACCEPTEDERR $FLTR $file" | wc -l)
FOUNDERR=$((ERR+FOUNDERR-1)) # Remove header row
section_end
done
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/webstandard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Webstandard (WCAG, W3C)
on:
push:
branches:
- main
- '[0-9]+.[0-9]+'
pull_request:
branches:
- main
- '[0-9]+.[0-9]+'

jobs:
standards:
runs-on: ubuntu-latest
container:
image: domjudge/gitlabci:24.04
services:
sqlserver:
image: mariadb
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: domjudge
MYSQL_PASSWORD: domjudge
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
role: [public, team, balloon, jury, admin]
test: [w3cval, WCAG2A, WCAG2AA]
db: [bare-install, install]
releaseBranch:
- ${{ contains(github.ref, 'main') }}
exclude:
- releaseBranch: false
- role: jury
test: WCAG2AA
- role: jury
test: WCAG2A
- role: admin
test: WCAG2AA
- role: admin
test: WCAG2A
include:
- role: public
test: WCAG2AA
db: install
- role: public
test: w3cval
db: install
- role: admin
test: w3cval
db: install
steps:
- uses: actions/checkout@v4
- name: Install DOMjudge
run: .github/jobs/baseinstall.sh ${{ matrix.role }}
- name: Run webstandard tests (W3C, WCAG)
run: .github/jobs/webstandard.sh ${{ matrix.test }} ${{ matrix.role }}
- name: Upload all logs/artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.role }}-${{ matrix.test }}-${{ matrix.db }}-logs
path: |
/tmp/artifacts
/var/log/nginx
/opt/domjudge/domserver/webapp/var/log/*.log
Loading