Skip to content

Commit c813ac1

Browse files
authored
Merge pull request #4085 from OpenLiberty/staging
Update prod
2 parents 823b69b + 6dafdf6 commit c813ac1

16 files changed

+162
-21
lines changed
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: Accessibility tests for main pages
2+
3+
on:
4+
push:
5+
branches:
6+
- prod
7+
workflow_dispatch:
8+
9+
jobs:
10+
run-accessibility-tests:
11+
runs-on: ubuntu-latest
12+
container: cypress/included:13.9.0
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Cleanup previous results
18+
run: rm -rf /__w/openliberty.io/openliberty.io/src/test/cypressjs/results/*
19+
20+
- name: Cleanup Cypress Cache
21+
run: rm -rf ~/.cache/Cypress
22+
23+
- name: Run first test file
24+
run: |
25+
cypress run --browser chrome --headed \
26+
--env JDK_VERSION="1.8.0_311" \
27+
--config-file /__w/openliberty.io/openliberty.io/src/test/cypressjs/cypress.config.js \
28+
--spec "/__w/openliberty.io/openliberty.io/src/test/cypressjs/cypress/e2e/generalAllyTest.cy.js"
29+
- name: Debug - List files
30+
run: ls -R /__w/openliberty.io/openliberty.io/src/test/cypressjs/results
31+
32+
- name: Setup Node.js
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: 20
36+
37+
- name: Install zip utility
38+
run: apt-get update && apt-get install -y zip
39+
40+
- name: Analyze Accessibility Results
41+
id: analyze_results
42+
run: |
43+
node <<'EOF'
44+
import fs from 'fs';
45+
import path from 'path';
46+
import { execSync } from 'child_process';
47+
48+
const resultsDir = '/__w/openliberty.io/openliberty.io/src/test/cypressjs/results/OL.io';
49+
if (!fs.existsSync(resultsDir)) {
50+
console.log('No results directory found.');
51+
process.exit(0);
52+
}
53+
54+
const files = fs.readdirSync(resultsDir).filter(f => f.endsWith('.json'));
55+
const violatingFiles = [];
56+
57+
for (const file of files) {
58+
const filePath = path.join(resultsDir, file);
59+
try {
60+
const data = JSON.parse(fs.readFileSync(filePath, 'utf8'));
61+
const violations = data?.summary?.counts?.violation ?? 0;
62+
if (violations > 0) violatingFiles.push(file);
63+
} catch (err) {
64+
console.error(`Error parsing ${file}:`, err);
65+
}
66+
}
67+
68+
if (violatingFiles.length > 0) {
69+
// Create ZIP of violating files for download
70+
const zipName = 'violations_only.zip';
71+
const fileList = violatingFiles.map(f => path.join(resultsDir, f)).join(' ');
72+
execSync(`zip -j ${zipName} ${fileList}`);
73+
74+
// Store output for next steps
75+
const fileNamesWithoutExt = violatingFiles.map(f => path.basename(f, '.json')).join(', ');
76+
fs.appendFileSync(process.env.GITHUB_OUTPUT, `violations=${fileNamesWithoutExt}\n`);
77+
fs.appendFileSync(process.env.GITHUB_OUTPUT, `zip_file=${zipName}\n`);
78+
console.log('Violations found in:', fileNamesWithoutExt);
79+
} else {
80+
console.log('No accessibility violations found.');
81+
}
82+
EOF
83+
84+
- name: Upload Violations ZIP
85+
if: steps.analyze_results.outputs.zip_file != ''
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: accessibility-violations
89+
path: ${{ steps.analyze_results.outputs.zip_file }}
90+
retention-days: 7
91+
92+
- name: Generate Issue Content
93+
if: steps.analyze_results.outputs.violations != ''
94+
run: |
95+
echo "### Accessibility Violations Detected" > issue.md
96+
echo "" >> issue.md
97+
echo "Cypress has reported accessibility violations on the following pages:" >> issue.md
98+
echo "${{ steps.analyze_results.outputs.violations }}" >> issue.md
99+
echo "" >> issue.md
100+
echo "[Download violating result files (ZIP)](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> issue.md
101+
echo "" >> issue.md
102+
echo "_This issue was automatically generated by the accessibility testing workflow._" >> issue.md
103+
104+
- name: Create GitHub Issue
105+
if: steps.analyze_results.outputs.violations != ''
106+
uses: peter-evans/create-issue-from-file@v5
107+
with:
108+
title: "Accessibility violations detected in main pages"
109+
content-filepath: issue.md
110+
labels: a11y

docker/Dockerfile.demo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ RUN ./mvnw -B -Dhttps.protocols=TLSv1.2 compile war:exploded
4949
#
5050
#
5151
#
52-
FROM icr.io/appcafe/open-liberty:25.0.0.10-kernel-slim-java8-ibmjava-ubi as runtime
52+
FROM icr.io/appcafe/open-liberty:25.0.0.11-kernel-slim-java8-ibmjava-ubi as runtime
5353
ENV SEC_TLS_TRUSTDEFAULTCERTS true
5454

5555
COPY --chown=1001:0 src/main/wlp/server.xml /config/server.xml

docker/Dockerfile.draft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ RUN ./mvnw -B -Dhttps.protocols=TLSv1.2 compile war:exploded
5050
#
5151
#
5252
#
53-
FROM icr.io/appcafe/open-liberty:25.0.0.10-kernel-slim-java8-ibmjava-ubi as runtime
53+
FROM icr.io/appcafe/open-liberty:25.0.0.11-kernel-slim-java8-ibmjava-ubi as runtime
5454
ENV SEC_TLS_TRUSTDEFAULTCERTS true
5555

5656
COPY --chown=1001:0 src/main/wlp/server.xml /config/server.xml

docker/Dockerfile.prod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ COPY --from=docs --chown=1001:0 /temp-docs/docs /target/openliberty-website-1.0-
6868
#
6969
#
7070
#
71-
FROM icr.io/appcafe/open-liberty:25.0.0.10-kernel-slim-java8-ibmjava-ubi as runtime
71+
FROM icr.io/appcafe/open-liberty:25.0.0.11-kernel-slim-java8-ibmjava-ubi as runtime
7272
ENV SEC_TLS_TRUSTDEFAULTCERTS true
7373

7474
COPY --chown=1001:0 src/main/wlp/server.xml /config/server.xml

docker/Dockerfile.staging

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ COPY --from=docs --chown=1001:0 /temp-docs/docs /target/openliberty-website-1.0-
6565
#
6666
#
6767
#
68-
FROM icr.io/appcafe/open-liberty:25.0.0.10-kernel-slim-java8-ibmjava-ubi as runtime
68+
FROM icr.io/appcafe/open-liberty:25.0.0.11-kernel-slim-java8-ibmjava-ubi as runtime
6969
ENV SEC_TLS_TRUSTDEFAULTCERTS true
7070

7171
COPY --chown=1001:0 src/main/wlp/server.xml /config/server.xml

docker/blogs/Dockerfile.blogs.draft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ RUN ./mvnw -B -Dhttps.protocols=TLSv1.2 compile war:exploded
4242
#
4343
#
4444
#
45-
FROM icr.io/appcafe/open-liberty:25.0.0.10-kernel-slim-java8-ibmjava-ubi as runtime
45+
FROM icr.io/appcafe/open-liberty:25.0.0.11-kernel-slim-java8-ibmjava-ubi as runtime
4646
ENV SEC_TLS_TRUSTDEFAULTCERTS true
4747

4848
COPY --chown=1001:0 src/main/wlp/server.xml /config/server.xml

docker/blogs/Dockerfile.blogs.staging

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ RUN ./mvnw -B -Dhttps.protocols=TLSv1.2 compile war:exploded
4242
#
4343
#
4444
#
45-
FROM icr.io/appcafe/open-liberty:25.0.0.10-kernel-slim-java8-ibmjava-ubi as runtime
45+
FROM icr.io/appcafe/open-liberty:25.0.0.11-kernel-slim-java8-ibmjava-ubi as runtime
4646
ENV SEC_TLS_TRUSTDEFAULTCERTS true
4747

4848
COPY --chown=1001:0 src/main/wlp/server.xml /config/server.xml

docker/certifications/Dockerfile.certifications.draft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ RUN ./mvnw -B -Dhttps.protocols=TLSv1.2 compile war:exploded
4242
#
4343
#
4444
#
45-
FROM icr.io/appcafe/open-liberty:25.0.0.10-kernel-slim-java8-ibmjava-ubi as runtime
45+
FROM icr.io/appcafe/open-liberty:25.0.0.11-kernel-slim-java8-ibmjava-ubi as runtime
4646
ENV SEC_TLS_TRUSTDEFAULTCERTS true
4747

4848
COPY --chown=1001:0 src/main/wlp/server.xml /config/server.xml

docker/certifications/Dockerfile.certifications.staging

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ RUN ./mvnw -B -Dhttps.protocols=TLSv1.2 compile war:exploded
4242
#
4343
#
4444
#
45-
FROM icr.io/appcafe/open-liberty:25.0.0.10-kernel-slim-java8-ibmjava-ubi as runtime
45+
FROM icr.io/appcafe/open-liberty:25.0.0.11-kernel-slim-java8-ibmjava-ubi as runtime
4646
ENV SEC_TLS_TRUSTDEFAULTCERTS true
4747

4848
COPY --chown=1001:0 src/main/wlp/server.xml /config/server.xml

docker/docs/Dockerfile.docs.draft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ RUN ./mvnw -B -Dhttps.protocols=TLSv1.2 compile war:exploded
5454
#
5555
#
5656
#
57-
FROM icr.io/appcafe/open-liberty:25.0.0.10-kernel-slim-java8-ibmjava-ubi as runtime
57+
FROM icr.io/appcafe/open-liberty:25.0.0.11-kernel-slim-java8-ibmjava-ubi as runtime
5858
ENV SEC_TLS_TRUSTDEFAULTCERTS true
5959

6060
COPY --chown=1001:0 src/main/wlp/server.xml /config/server.xml

0 commit comments

Comments
 (0)