Skip to content

Commit

Permalink
Enable webstandard job after fixed image
Browse files Browse the repository at this point in the history
This reverts commit 90c3ab8.
  • Loading branch information
vmcj committed Aug 26, 2024
1 parent cf4832b commit b3cac2c
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 3 deletions.
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

0 comments on commit b3cac2c

Please sign in to comment.