feat: move away from allure #8
Workflow file for this run
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: Screen Reader Tests Preview Report | |
on: | |
pull_request: | |
branches: [main] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
deployments: write | |
pages: write | |
id-token: write | |
pull-requests: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "aria-at-tests-preview-report" | |
cancel-in-progress: true | |
jobs: | |
macos-install: | |
name: MacOS Install | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
id: cache-macos-node-modules | |
with: | |
path: | | |
node_modules | |
key: macos-modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('package.json') }} | |
- name: Cache Playwright binaries | |
uses: actions/cache@v3 | |
id: cache-macos-playwright | |
with: | |
path: | | |
~/Library/Caches/ms-playwright | |
key: macos-playwright-${{ hashFiles('yarn.lock') }}-${{ hashFiles('package.json') }} | |
- name: Cache Test Suites | |
uses: actions/cache@v3 | |
id: cache-macos-test-suites | |
with: | |
path: | | |
testSuites.json | |
key: macos-testSuites-${{ hashFiles('aria-at') }}-${{ hashFiles('ignoredTests.json') }} | |
- name: Install Dependencies | |
if: steps.cache-macos-node-modules.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- name: Install Playwright Browsers | |
if: steps.cache-macos-playwright.outputs.cache-hit != 'true' | |
run: yarn test:install | |
- name: Generate Test Suites | |
if: steps.cache-macos-test-suites.outputs.cache-hit != 'true' | |
run: yarn test:generate | |
windows-install: | |
name: Windows Install | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
id: cache-windows-node-modules | |
with: | |
path: | | |
node_modules | |
key: windows-modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('package.json') }} | |
- name: Cache Playwright binaries | |
uses: actions/cache@v3 | |
id: cache-windows-playwright | |
with: | |
path: | | |
C:\Users\runneradmin\AppData\Local\ms-playwright | |
key: windows-playwright-${{ hashFiles('yarn.lock') }}-${{ hashFiles('package.json') }} | |
- name: Cache Test Suites | |
uses: actions/cache@v3 | |
id: cache-windows-test-suites | |
with: | |
path: | | |
testSuites.json | |
key: windows-testSuites-${{ hashFiles('aria-at') }}-${{ hashFiles('ignoredTests.json') }} | |
- name: Install Dependencies | |
if: steps.cache-windows-node-modules.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- name: Install Playwright Browsers | |
if: steps.cache-windows-playwright.outputs.cache-hit != 'true' | |
run: yarn test:install | |
- name: Generate Test Suites | |
if: steps.cache-windows-test-suites.outputs.cache-hit != 'true' | |
run: yarn test:generate | |
test-voiceover-preview: | |
name: Playwright VoiceOver Reduced Tests (${{ matrix.shardIndex }} / 1) | |
needs: macos-install | |
runs-on: macos-12 | |
strategy: | |
fail-fast: false | |
matrix: | |
shardIndex: [1] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Guidepup Setup | |
uses: guidepup/[email protected] | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
with: | |
path: | | |
node_modules | |
key: macos-modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('package.json') }} | |
- name: Cache Playwright | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/Library/Caches/ms-playwright | |
key: macos-playwright-${{ hashFiles('yarn.lock') }}-${{ hashFiles('package.json') }} | |
- name: Cache Test Suites | |
uses: actions/cache@v3 | |
with: | |
path: | | |
testSuites.json | |
key: macos-testSuites-${{ hashFiles('aria-at') }}-${{ hashFiles('ignoredTests.json') }} | |
- name: Run Tests | |
run: yarn test ./src/macOsVoiceOver.spec.ts --config macos.config.ts --shard ${{ matrix.shardIndex }}/2000 | |
continue-on-error: true | |
- name: Upload Playwright Artifacts | |
uses: actions/upload-artifact@v4 | |
if: always() | |
continue-on-error: true | |
with: | |
name: artifacts-macos-voiceover-${{ matrix.shardIndex }} | |
path: | | |
./test-results | |
./recordings | |
- name: Upload HTML Report Artifacts | |
uses: actions/upload-artifact@v4 | |
if: always() | |
continue-on-error: true | |
with: | |
name: playwright-report-macos-voiceover-${{ matrix.shardIndex }} | |
path: ./playwright-report | |
test-nvda-preview: | |
name: Playwright NVDA Reduced Tests (${{ matrix.shardIndex }} / 1) | |
needs: windows-install | |
runs-on: windows-2022 | |
strategy: | |
fail-fast: false | |
matrix: | |
shardIndex: [1] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Guidepup Setup | |
uses: guidepup/[email protected] | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
with: | |
path: | | |
node_modules | |
key: windows-modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('package.json') }} | |
- name: Cache Playwright | |
uses: actions/cache@v3 | |
with: | |
path: | | |
C:\Users\runneradmin\AppData\Local\ms-playwright | |
key: windows-playwright-${{ hashFiles('yarn.lock') }}-${{ hashFiles('package.json') }} | |
- name: Cache Test Suites | |
uses: actions/cache@v3 | |
with: | |
path: | | |
testSuites.json | |
key: windows-testSuites-${{ hashFiles('aria-at') }}-${{ hashFiles('ignoredTests.json') }} | |
- name: Run Tests | |
run: yarn test ./src/windowsNvda.spec.ts --config windows.config.ts --shard ${{ matrix.shardIndex }}/2000 | |
continue-on-error: true | |
- name: Upload Playwright Artifacts | |
uses: actions/upload-artifact@v4 | |
if: always() | |
continue-on-error: true | |
with: | |
name: artifacts-windows-nvda-${{ matrix.shardIndex }} | |
path: | | |
./test-results | |
./recordings | |
- name: Upload HTML Report Artifacts | |
uses: actions/upload-artifact@v4 | |
if: always() | |
continue-on-error: true | |
with: | |
name: playwright-report-windows-nvda-${{ matrix.shardIndex }} | |
path: ./playwright-report | |
publish-preview-html-report: | |
name: Publish Preview HTML Report | |
if: always() | |
needs: [test-voiceover-preview, test-nvda-preview] | |
runs-on: ubuntu-latest | |
environment: | |
name: aria-at-tests-preview-report | |
url: ${{ steps.deploy-pages.outputs.page_url }} | |
steps: | |
- name: Clear Space | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /usr/local/lib/android | |
sudo rm -rf /opt/ghc | |
sudo rm -rf /opt/hostedtoolcache/CodeQL | |
sudo docker image prune --all --force | |
sudo apt-get purge -y \ | |
'^llvm-.*' \ | |
'php.*' \ | |
'^mongodb-.*' \ | |
'^mysql-.*' \ | |
azure-cli \ | |
google-chrome-stable \ | |
firefox \ | |
powershell \ | |
microsoft-edge-stable \ | |
mono-devel | |
sudo apt-get autoremove -y | |
sudo apt-get clean | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: playwright-report-* | |
path: ./playwright-report | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
id: cache-macos-node-modules | |
with: | |
path: | | |
node_modules | |
key: macos-modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('package.json') }} | |
- name: Create Test Report | |
run: yarn test:report | |
- name: Cleanup Downloads | |
run: rm -rf ./playwright-report || true | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Upload HTML Report | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: html-report | |
- name: Deploy to GitHub Pages | |
id: deploy-pages | |
uses: actions/deploy-pages@v4 | |
- name: PR Comment | |
if: ${{ always() && github.event_name == 'pull_request' }} | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
message: | | |
Playwright Test Report: ${{steps.deploy-pages.outputs.page_url}} | |
comment_tag: "Playwright Test Report" | |
pr_number: ${{ inputs.pr_number }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |