Skip to content

Commit 5256a45

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/npm-minor-and-patch-90aa8db967
2 parents db2b8f9 + 9793679 commit 5256a45

File tree

3 files changed

+28
-16
lines changed

3 files changed

+28
-16
lines changed

.github/actions/gh-cache/cache/action.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ inputs:
1414
fail_on_cache_miss:
1515
description: "Fail the workflow if cached item is not found."
1616
required: false
17-
default: 'false'
17+
default: "false"
1818

1919
outputs:
2020
value:
@@ -24,8 +24,15 @@ outputs:
2424
runs:
2525
using: "composite"
2626
steps:
27+
- name: Make sub-actions referenceable
28+
working-directory: ${{ github.action_path }}
29+
shell: bash
30+
run: |
31+
mkdir -p /home/runner/work/_actions/current/.github/actions
32+
rsync -a ../../../../.github/actions/ /home/runner/work/_actions/current/.github/actions/
33+
ls -ltra /home/runner/work/_actions/current/.github/actions
2734
- name: Restore cached value
28-
uses: ./.github/actions/gh-cache/restore
35+
uses: ./../../_actions/current/.github/actions/gh-cache/restore
2936
with:
3037
path: ${{ inputs.key }}
3138
token: ${{ inputs.token }}
@@ -41,7 +48,7 @@ runs:
4148
4249
- if: ${{ inputs.value }}
4350
name: Save cached value
44-
uses: ./.github/actions/gh-cache/save
51+
uses: ./../../_actions/current/.github/actions/gh-cache/save
4552
with:
4653
path: ${{ inputs.key }}
4754
token: ${{ inputs.token }}

action.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,16 @@ outputs:
4040
runs:
4141
using: "composite"
4242
steps:
43+
- name: Make sub-actions referenceable
44+
working-directory: ${{ github.action_path }}
45+
shell: bash
46+
run: |
47+
mkdir -p /home/runner/work/_actions/current/.github/actions
48+
rsync -a .github/actions/ /home/runner/work/_actions/current/.github/actions/
49+
ls -ltra /home/runner/work/_actions/current/.github/actions
4350
- name: Restore cached results
4451
id: restore
45-
uses: ./.github/actions/gh-cache/cache
52+
uses: ./../../_actions/current/.github/actions/gh-cache/cache
4653
with:
4754
key: ${{ inputs.cache_key }}
4855
token: ${{ inputs.token }}
@@ -59,20 +66,20 @@ runs:
5966
- if: ${{ inputs.login_url && inputs.username && inputs.password && !inputs.auth_context }}
6067
name: Authenticate
6168
id: auth
62-
uses: ./.github/actions/auth
69+
uses: ./../../_actions/current/.github/actions/auth
6370
with:
6471
login_url: ${{ inputs.login_url }}
6572
username: ${{ inputs.username }}
6673
password: ${{ inputs.password }}
6774
- name: Find
6875
id: find
69-
uses: ./.github/actions/find
76+
uses: ./../../_actions/current/.github/actions/find
7077
with:
7178
urls: ${{ inputs.urls }}
7279
auth_context: ${{ inputs.auth_context || steps.auth.outputs.auth_context }}
7380
- name: File
7481
id: file
75-
uses: ./.github/actions/file
82+
uses: ./../../_actions/current/.github/actions/file
7683
with:
7784
findings: ${{ steps.find.outputs.findings }}
7885
repository: ${{ inputs.repository }}
@@ -89,7 +96,7 @@ runs:
8996
- if: ${{ inputs.skip_copilot_assignment != 'true' }}
9097
name: Fix
9198
id: fix
92-
uses: ./.github/actions/fix
99+
uses: ./../../_actions/current/.github/actions/fix
93100
with:
94101
issues: ${{ steps.get_issues_from_filings.outputs.issues }}
95102
repository: ${{ inputs.repository }}
@@ -119,7 +126,7 @@ runs:
119126
FILINGS: ${{ steps.file.outputs.filings }}
120127
FIXINGS: ${{ steps.fix.outputs.fixings }}
121128
- name: Save cached results
122-
uses: ./.github/actions/gh-cache/cache
129+
uses: ./../../_actions/current/.github/actions/gh-cache/cache
123130
with:
124131
key: ${{ inputs.cache_key }}
125132
value: ${{ steps.results.outputs.results }}

tests/site-with-errors.test.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@ describe("site-with-errors", () => {
1717

1818
it("cache has expected results", () => {
1919
const actual = results.map(({ issue: { url: issueUrl }, pullRequest: { url: pullRequestUrl }, findings }) => {
20-
const { solutionLong, ...finding } = findings[0];
20+
const { problemUrl, solutionLong, ...finding } = findings[0];
2121
// Check volatile fields for existence only
2222
expect(issueUrl).toBeDefined();
2323
expect(pullRequestUrl).toBeDefined();
24+
expect(problemUrl).toBeDefined();
2425
expect(solutionLong).toBeDefined();
26+
// Check `problemUrl`, ignoring axe version
27+
expect(problemUrl.startsWith("https://dequeuniversity.com/rules/axe/")).toBe(true);
28+
expect(problemUrl.endsWith(`/${finding.ruleId}?application=playwright`)).toBe(true);
2529
return finding;
2630
});
2731
const expected = [
@@ -30,15 +34,13 @@ describe("site-with-errors", () => {
3034
url: "http://127.0.0.1:4000/",
3135
html: '<span class="post-meta">Jul 30, 2025</span>',
3236
problemShort: "elements must meet minimum color contrast ratio thresholds",
33-
problemUrl: "https://dequeuniversity.com/rules/axe/4.10/color-contrast?application=playwright",
3437
ruleId: "color-contrast",
3538
solutionShort: "ensure the contrast between foreground and background colors meets wcag 2 aa minimum contrast ratio thresholds"
3639
}, {
3740
scannerType: "axe",
3841
url: "http://127.0.0.1:4000/",
3942
html: '<html lang="en">',
4043
problemShort: "page should contain a level-one heading",
41-
problemUrl: "https://dequeuniversity.com/rules/axe/4.10/page-has-heading-one?application=playwright",
4244
ruleId: "page-has-heading-one",
4345
solutionShort: "ensure that the page, or at least one of its frames contains a level-one heading"
4446
}, {
@@ -47,31 +49,27 @@ describe("site-with-errors", () => {
4749
html: `<time class="dt-published" datetime="2025-07-30T17:32:33+00:00" itemprop="datePublished">Jul 30, 2025
4850
</time>`,
4951
problemShort: "elements must meet minimum color contrast ratio thresholds",
50-
problemUrl: "https://dequeuniversity.com/rules/axe/4.10/color-contrast?application=playwright",
5152
ruleId: "color-contrast",
5253
solutionShort: "ensure the contrast between foreground and background colors meets wcag 2 aa minimum contrast ratio thresholds",
5354
}, {
5455
scannerType: "axe",
5556
url: "http://127.0.0.1:4000/about/",
5657
html: '<a href="https://jekyllrb.com/">jekyllrb.com</a>',
5758
problemShort: "elements must meet minimum color contrast ratio thresholds",
58-
problemUrl: "https://dequeuniversity.com/rules/axe/4.10/color-contrast?application=playwright",
5959
ruleId: "color-contrast",
6060
solutionShort: "ensure the contrast between foreground and background colors meets wcag 2 aa minimum contrast ratio thresholds",
6161
}, {
6262
scannerType: "axe",
6363
url: "http://127.0.0.1:4000/404.html",
6464
html: '<li class="p-name">Accessibility Scanner Demo</li>',
6565
problemShort: "elements must meet minimum color contrast ratio thresholds",
66-
problemUrl: "https://dequeuniversity.com/rules/axe/4.10/color-contrast?application=playwright",
6766
ruleId: "color-contrast",
6867
solutionShort: "ensure the contrast between foreground and background colors meets wcag 2 aa minimum contrast ratio thresholds"
6968
}, {
7069
scannerType: "axe",
7170
url: "http://127.0.0.1:4000/404.html",
7271
html: '<h1 class="post-title"></h1>',
7372
problemShort: "headings should not be empty",
74-
problemUrl: "https://dequeuniversity.com/rules/axe/4.10/empty-heading?application=playwright",
7573
ruleId: "empty-heading",
7674
solutionShort: "ensure headings have discernible text",
7775
},

0 commit comments

Comments
 (0)