test-vo #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test-vo | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" # Runs at 00:00 UTC every day | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test-vo: | |
name: Test VoiceOver | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.npm | |
website/.next/cache | |
key: | | |
test-vo-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | |
restore-keys: | | |
test-vo-nextjs-${{ hashFiles('**/package-lock.json') }}- | |
- name: Install dependencies | |
run: npm ci --no-audit | |
- name: Install playwright | |
run: npx playwright install --with-deps webkit | |
- name: Build website | |
run: npm run build-website | |
- name: Guidepup Setup | |
uses: guidepup/setup-action@0.11.2 | |
with: | |
record: true | |
- name: Test | |
id: test | |
run: npm run test-vo | |
- name: Upload test results to GitHub | |
if: failure() && steps.test.outcome == 'failure' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-results | |
path: | | |
test-results | |
recordings | |
retention-days: 30 |