This repository has been archived by the owner on Dec 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (59 loc) · 2.21 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: watch-material-ui
on:
push:
repository_dispatch:
schedule:
# run every hour to catch new deploys of the default branch
# netlify triggers no status check so I don't know
# how I could be notified if it finishes a deploy of the default branch
- cron: "0 * * * *"
defaults:
run:
shell: powershell
jobs:
a11y-snapshot:
runs-on: windows-latest
env:
NVDA_LOG_FILE_PATH: '${{ github.workspace }}\lib\a11y-snapshot\nvda.log'
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: "16.x"
# TODO: Fails on scheduled and repository dispatch events e.g. https://github.com/eps1lon/mui-scripts-incubator/runs/1506954046?check_suite_focus=true
# - name: Cache modules
# uses: actions/cache@v2
# with:
# # https://github.com/microsoft/playwright/blob/HEAD/docs/installation.md#managing-browser-binaries
# path: |
# '$(UserProfile)\AppData\Local\ms-playwright'
# '$(UserProfile)\AppData\Local\screen-reader-testing-library'
# **/node_modules
# key: cache-v1-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
# restore-keys: |
# cache-v1-${{ runner.os }}
- uses: microsoft/playwright-github-action@v1
- name: install
run: yarn install
- name: Check environment
run: |
node bin/env.js
- uses: ./actions/cleanup
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: "Run bin/watch-material-ui.js"
run: |
$NVDA_BIN = "${{ github.workspace }}\node_modules\screen-reader-testing-library\bin\nvda.ps1"
$LOG_FILE_PATH = "${{ env.NVDA_LOG_FILE_PATH }}"
& $NVDA_BIN -logFile "$LOG_FILE_PATH"
node bin/watch-material-ui.js --githubEventPath "$Env:GITHUB_EVENT_PATH" --githubEventName "$Env:GITHUB_EVENT_NAME" --githubRepository "$Env:GITHUB_REPOSITORY"
& $NVDA_BIN -quit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: nvda.log
path: |
${{ env.NVDA_LOG_FILE_PATH }}