Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add preview page #5499

Draft
wants to merge 38 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c80ac17
Add preview page
hussam-i-am Jan 6, 2025
a6878ff
Fix copy
hussam-i-am Jan 6, 2025
4680b7f
Fix copy
hussam-i-am Jan 6, 2025
d6d1dcc
Update location
hussam-i-am Jan 6, 2025
cb9c650
Remove if statement
hussam-i-am Jan 6, 2025
d021ff3
Add 404 page
hussam-i-am Jan 6, 2025
88458d1
Simple styling
hussam-i-am Jan 6, 2025
14da295
create separate workflow files
hussam-i-am Jan 7, 2025
d23b6f3
format fix
hussam-i-am Jan 7, 2025
1eeaea7
Download artifacts
hussam-i-am Jan 7, 2025
f94543a
format fix
hussam-i-am Jan 7, 2025
162d8d4
disable pull-requet
hussam-i-am Jan 7, 2025
e6717aa
use workflow_call
hussam-i-am Jan 7, 2025
c83778c
update concurrency group
hussam-i-am Jan 7, 2025
a37676a
update paths
hussam-i-am Jan 7, 2025
dc43e5d
rework workflow
hussam-i-am Jan 7, 2025
bfff220
add conditional
hussam-i-am Jan 7, 2025
a5b01b4
Merge branch 'main' of https://github.com/primer/react into hussam-i-…
hussam-i-am Jan 7, 2025
a7e41ff
update version
hussam-i-am Jan 7, 2025
a708934
update artifact name
hussam-i-am Jan 7, 2025
3d08d7d
Merge branch 'main' into hussam-i-am/preview-page
hussam-i-am Jan 7, 2025
1b07d6e
test vrt fail
hussam-i-am Jan 7, 2025
a1d4219
Merge branch 'hussam-i-am/preview-page' of https://github.com/primer/…
hussam-i-am Jan 7, 2025
d1ecd46
test vrt fail
hussam-i-am Jan 7, 2025
e3ea470
continue on error
hussam-i-am Jan 8, 2025
d799e78
skip download if failed
hussam-i-am Jan 8, 2025
0193494
revert css change
hussam-i-am Jan 8, 2025
2aac527
add always
hussam-i-am Jan 8, 2025
20b2de0
add always
hussam-i-am Jan 8, 2025
3f5ea17
simple styling
hussam-i-am Jan 8, 2025
d29843f
add deployments
hussam-i-am Jan 8, 2025
2fa3e98
update env names
hussam-i-am Jan 8, 2025
68a4fbe
Merge branch 'main' into hussam-i-am/preview-page
hussam-i-am Jan 8, 2025
75fb124
format fix
hussam-i-am Jan 8, 2025
6360b93
Merge branch 'hussam-i-am/preview-page' of https://github.com/primer/…
hussam-i-am Jan 8, 2025
c481053
reset state
hussam-i-am Jan 8, 2025
1ad7e8e
force vrt fail
hussam-i-am Jan 9, 2025
afbdd0c
Merge branch 'main' into hussam-i-am/preview-page
hussam-i-am Jan 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
173 changes: 173 additions & 0 deletions .github/workflows/aat-reports.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
name: AAT Reports
on:
push:
branches:
- main
- next-major
workflow_call:
outputs:
aat-all-flags:
value: ${{ jobs.aat-all-flags.result }}
aat-no-flag:
value: ${{ jobs.aat.result }}
merge_group:
branches:
- main
- next-major
types:
- checks_requested

concurrency:
group: aat-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
aat-runner:
runs-on: ubuntu-latest-16-cores
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build storybook
run: npx storybook build
working-directory: packages/react
- name: Run storybook
id: storybook
working-directory: packages/react
run: |
npx serve -l 6006 storybook-static &
pid=$!
echo "pid=$pid" >> $GITHUB_OUTPUT
sleep 5
- name: Run AAT
uses: docker://mcr.microsoft.com/playwright:v1.47.2-jammy
env:
STORYBOOK_URL: 'http://172.17.0.1:6006'
with:
args: npx playwright test --grep @aat --shard="${{ matrix.shard }}/${{ strategy.job-total }}"
- name: Stop storybook
run: kill ${{ steps.storybook.outputs.pid }}
- name: Upload report
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: axe-no-flag-${{ matrix.shard }}
path: blob-report
retention-days: 1

aat:
if: ${{ always() }}
runs-on: ubuntu-latest
needs: aat-runner
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: install dependencies
run: npm ci
- name: download all reports
uses: actions/download-artifact@v4
with:
path: all-blob-reports
pattern: axe-no-flag-*
merge-multiple: true
- name: merge all reports
run: npx playwright merge-reports --reporter html ./all-blob-reports
- name: Upload report
uses: actions/upload-artifact@v4
with:
name: axe
path: playwright-report
- name: Check aat-runner job status
if: ${{ needs.aat-runner.result == 'failure' }}
continue-on-error: true
run: exit 1

aat-runner-all-flags:
runs-on: ubuntu-latest-16-cores
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
env:
VITE_PRIMER_REACT_CSS_MODULES_TEAM: 1
VITE_PRIMER_REACT_CSS_MODULES_STAFF: 1
VITE_PRIMER_REACT_CSS_MODULES_GA: 1
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build storybook
run: npx storybook build
working-directory: packages/react
- name: Run storybook
id: storybook
working-directory: packages/react
run: |
npx serve -l 6006 storybook-static &
pid=$!
echo "pid=$pid" >> $GITHUB_OUTPUT
sleep 5
- name: Run AAT
uses: docker://mcr.microsoft.com/playwright:v1.47.2-jammy
env:
STORYBOOK_URL: 'http://172.17.0.1:6006'
with:
args: npx playwright test --grep @aat --shard="${{ matrix.shard }}/${{ strategy.job-total }}"
- name: Stop storybook
run: kill ${{ steps.storybook.outputs.pid }}
- name: Upload report
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: axe-all-flags-${{ matrix.shard }}
path: blob-report
retention-days: 1

aat-all-flags:
if: ${{ always() }}
runs-on: ubuntu-latest
needs: aat-runner-all-flags
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: install dependencies
run: npm ci
- name: download all reports
uses: actions/download-artifact@v4
with:
path: all-blob-reports
pattern: axe-all-flags-*
merge-multiple: true
- name: merge all reports
run: npx playwright merge-reports --reporter html ./all-blob-reports
- name: Upload report
uses: actions/upload-artifact@v4
with:
name: axe-all-flags
path: playwright-report
- name: Check aat-runner-all-flags job status
if: ${{ needs.aat-runner-all-flags.result == 'failure' }}
continue-on-error: true
run: exit 1
Loading
Loading