Skip to content

Commit 98a21ac

Browse files
committed
feat(video): add audits recording litemode option
1 parent 1a0c776 commit 98a21ac

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

.github/workflows/action.yml

+1
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ jobs:
1818
TLD: true
1919
LIST: true
2020
UPGRADE: true
21+
RECORD: ./recordings

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ When running locally the action uses A11yWatch Lite.
2121
LIST: true
2222
FIX: false
2323
UPGRADE: false
24+
RECORD: false
2425
COMPUTER_VISION_SUBSCRIPTION_KEY: ${{ secrets.COMPUTER_VISION_SUBSCRIPTION_KEY }}
2526
COMPUTER_VISION_ENDPOINT: ${{ secrets.COMPUTER_VISION_ENDPOINT }}
2627
```
@@ -38,6 +39,7 @@ All inputs are **optional** except $WEBSITE_URL.
3839
| `SITEMAP` | Extend crawl with sitemap links (required SITE_WIDE=true). | true |
3940
| `TLD` | Include all tld extensions (required SITE_WIDE=true). | true |
4041
| `LIST` | Report the results to github as a pass or fail list or detailed report. | false |
42+
| `RECORD` | Record the audit as video to a directory. | |
4143
| `FAIL_TOTAL_COUNT` | Determine whether to fail the CI if total issues warnings and errors exceed the counter. Takes precedence over the other FAIL inputs. | 0 |
4244
| `FAIL_ERRORS_COUNT` | Determine whether to fail the CI if total issues with errors exceed the counter. | 0 |
4345
| `FAIL_WARNINGS_COUNT` | Determine whether to fail the CI if total issues with warnings exceed the counter. | 0 |

action.yml

+26-3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ inputs:
3737
description: Include all TLD extensions.
3838
required: false
3939
default: false
40+
RECORD:
41+
description: Enable video recording audits to a directory location.
42+
required: false
43+
default: ""
4044
FAIL_TOTAL_COUNT:
4145
description: Use to fail the CI if the amount of issues of type errors and warnings is greater than the count.
4246
required: false
@@ -135,15 +139,15 @@ runs:
135139
uses: baptiste0928/cargo-install@v1
136140
with:
137141
crate: a11ywatch_cli
138-
version: "0.10.4"
142+
version: "0.10.7"
139143
features: "grpc"
140144

141145
- name: A11yWatch CLI Install
142146
if: ${{ inputs.SLIM == 'false' }}
143147
uses: baptiste0928/cargo-install@v1
144148
with:
145149
crate: a11ywatch_cli
146-
version: "0.10.4"
150+
version: "0.10.7"
147151

148152
- name: Configure CLI creds
149153
if: ${{ inputs.A11YWATCH_TOKEN }}
@@ -160,10 +164,23 @@ runs:
160164
shell: bash
161165
run: a11ywatch --set-cv-url ${{ inputs.COMPUTER_VISION_ENDPOINT }}
162166

167+
- name: Configure Recording
168+
if: ${{ inputs.RECORD }}
169+
shell: bash
170+
run: a11ywatch --set-recording ${{ inputs.RECORD }}
171+
172+
- name: Configure Recording
173+
if: ${{ inputs.RECORD }}
174+
shell: bash
175+
run: a11ywatch --set-recording ${{ inputs.RECORD }}
176+
177+
- uses: FedericoCarboni/setup-ffmpeg@v2
178+
if: ${{ inputs.RECORD && inputs.RECORD != 'false' }}
179+
163180
- name: Build A11yWatch Service
164181
if: ${{ inputs.EXTERNAL == 'false' }}
165182
shell: bash
166-
run: a11ywatch build --standalone --local ${{ inputs.UPGRADE == 'true' && '--upgrade' || '' }}
183+
run: a11ywatch build --standalone --local ${{ inputs.UPGRADE == 'true' && '--upgrade' || '' }} && npx playwright install --with-deps chromium
167184

168185
- name: Start A11yWatch Service
169186
if: ${{ inputs.EXTERNAL == 'false' }}
@@ -273,6 +290,12 @@ runs:
273290
message: "fix(accessibility): add recommendations from scan"
274291
committer_name: GitHub Actions
275292

293+
- uses: actions/upload-artifact@v3
294+
if: ${{ inputs.RECORD && inputs.RECORD != 'false' && failure() || success() }}
295+
with:
296+
name: Recordings
297+
path: ${{ inputs.RECORD && inputs.RECORD != 'false' && inputs.RECORD || './recordings' }}
298+
276299
- name: Stop A11yWatch Service
277300
if: ${{ !inputs.EXTERNAL }}
278301
shell: bash

0 commit comments

Comments
 (0)