Skip to content

Commit

Permalink
Gut it
Browse files Browse the repository at this point in the history
  • Loading branch information
jugglinmike committed Jan 28, 2025
1 parent 772c92f commit 6106741
Showing 1 changed file with 13 additions and 91 deletions.
104 changes: 13 additions & 91 deletions .github/workflows/voiceover-test-debug.yml
Original file line number Diff line number Diff line change
@@ -1,96 +1,30 @@
name: voiceover-test
on:
workflow_dispatch:
inputs:
aria_at_ref:
description: |
The sha / ref to checkout for aria-at tests
required: false
type: string
work_dir:
description: |
The --plan-workingdir passed to the aria-at-automation harness.
Based from the aria-at repo build folder.
Uses a default of tests/alert if not provided.
required: false
type: string
callback_url:
description: |
The harness will send POST requests to this url using callback_header
header with test results.
required: false
type: string
status_url:
description: |
The harness will send POST requests to this url using callback_header
header with status updates.
required: false
type: string
callback_header:
description: |
The harness will send POST requests to callback_url using this header
with status updates.
required: false
type: string
macos_version:
description: "macOS version to run the test on"
required: false
type: choice
options:
- "13"
- "14"
default: "14"
browser:
description: |
The browser to use for testing, "chrome" or "firefox" or "safari", default "safari"
required: false
type: string
at_driver_server_version:
description: |
The version or version range of the macOS AT Driver server to install from npm
required: false
type: string
default: "~0.0.6"
name: voiceover-test-debug
on: push

env:
ARIA_AT_WORK_DIR: ${{ inputs.work_dir || 'tests/alert' }}
ARIA_AT_CALLBACK_URL: ${{ inputs.callback_url }}
ARIA_AT_STATUS_URL: ${{ inputs.status_url }}
ARIA_AT_CALLBACK_HEADER: ${{ inputs.callback_header || 'x-header-param:empty' }}
BROWSER: ${{ inputs.browser || 'safari' }}
AT_DRIVER_SERVER_VERSION: ${{ inputs.at_driver_server_version }}
ARIA_AT_WORK_DIR: 'tests/alert'
ARIA_AT_CALLBACK_URL: 'http://example.com'
ARIA_AT_STATUS_URL: 'http://example.com'
ARIA_AT_CALLBACK_HEADER: 'x-header-param:empty'
BROWSER: 'safari'
AT_DRIVER_SERVER_VERSION: '~0.0.6'

jobs:
voiceover-test:
runs-on: macos-${{ inputs.macos_version }}
runs-on: macos-14
steps:
# Checkout all repos first (helps cache purposes)
- uses: actions/checkout@v4

- name: Log job state QUEUED
if: inputs.status_url
run: ./report-status.sh QUEUED ''

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
cache-dependency-path: "**/package-lock.json"

- uses: browser-actions/setup-chrome@v1
if: inputs.browser == 'chrome'
with:
chrome-version: stable

- uses: browser-actions/setup-firefox@v1
if: inputs.browser == 'firefox'

- name: Install geckodriver
if: inputs.browser == 'firefox'
env:
token: ${{ secrets.GITHUB_TOKEN }}
run: ./install-geckodriver.sh
- name: Do NOT setup Environment
run: echo Pass

- name: Install the macOS AT Driver server package
run: npm install @bocoup/macos-at-driver-server@"${AT_DRIVER_SERVER_VERSION}"
Expand All @@ -105,12 +39,12 @@ jobs:
working-directory: node_modules/.bin
run: ../../wait-for-server.sh

- name: Checkout aria-at ref ${{ inputs.aria_at_ref || 'master' }}
- name: Checkout aria-at ref 'master'
uses: actions/checkout@v4
with:
repository: "w3c/aria-at"
path: "aria-at"
ref: ${{ inputs.aria_at_ref || 'master' }}
ref: 'master'

- name: Checkout aria-at-automation-harness
uses: actions/checkout@v4
Expand Down Expand Up @@ -149,21 +83,9 @@ jobs:
- name: Configure VoiceOver not to "Automatically Speak Web Page"
run: defaults write com.apple.VoiceOver4/default SCRCUserDefaultsAutomaticallySpeakWebPage 0

- name: Log job state RUNNING
if: inputs.status_url
run: './report-status.sh RUNNING "\"work_dir\": \"${ARIA_AT_WORK_DIR}\","'

- name: Run harness
run: ./run-tester.sh

- name: Log job state ERROR
if: failure() && inputs.status_url
run: ./report-status.sh ERROR ''

- name: Log job state COMPLETED
if: success() && inputs.status_url
run: ./report-status.sh COMPLETED ''

- name: upload *.{log,png}
uses: actions/upload-artifact@v4
if: always()
Expand Down

0 comments on commit 6106741

Please sign in to comment.