From c80ac17bffd0757f92a8a3f70cc3f771f8461580 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Mon, 6 Jan 2025 16:25:40 -0500 Subject: [PATCH 01/48] Add preview page --- .github/workflows/deploy_preview.yml | 4 ++-- packages/react/.storybook/index.html | 12 ++++++++++++ script/build-storybook | 2 ++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 packages/react/.storybook/index.html diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 92196d8130a..38d6969f96e 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -60,13 +60,13 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} environment: storybook-preview-${{ github.event.number }} - environment_url: '${{ needs.deploy-preview.outputs.deployment_url }}/storybook' + environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}storybook' - name: Update storybook deployment status (success) if: success() uses: chrnorm/deployment-status@v2.0.3 with: token: ${{ secrets.GITHUB_TOKEN }} - environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}/storybook' + environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}storybook' state: 'success' deployment-id: ${{ steps.storybook.outputs.deployment_id }} - name: Update storybook deployment status (failure) diff --git a/packages/react/.storybook/index.html b/packages/react/.storybook/index.html new file mode 100644 index 00000000000..c2b81f36bf4 --- /dev/null +++ b/packages/react/.storybook/index.html @@ -0,0 +1,12 @@ + + + + + + Storybook + + +

Welcome to Storybook

+

Go to Storybook

+ + \ No newline at end of file diff --git a/script/build-storybook b/script/build-storybook index 9c120b6e21b..cac9366a422 100755 --- a/script/build-storybook +++ b/script/build-storybook @@ -6,6 +6,8 @@ cd packages/react # Add base url to be able to serve static files if [ -n "$1" ]; then echo '' >> .storybook/manager-head.html + + cp .storybook/index.html ../../docs/public/storybook/index.html else echo '' >> .storybook/manager-head.html fi From a6878ffb64067ad0495d30f590431705175e14ea Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Mon, 6 Jan 2025 16:29:28 -0500 Subject: [PATCH 02/48] Fix copy --- script/build-storybook | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/build-storybook b/script/build-storybook index cac9366a422..876a0d9c7f2 100755 --- a/script/build-storybook +++ b/script/build-storybook @@ -7,7 +7,7 @@ cd packages/react if [ -n "$1" ]; then echo '' >> .storybook/manager-head.html - cp .storybook/index.html ../../docs/public/storybook/index.html + cp .storybook/index.html ../../docs/public/storybook else echo '' >> .storybook/manager-head.html fi From 4680b7f31928a702609e742691d4c0f906e091ae Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Mon, 6 Jan 2025 16:32:00 -0500 Subject: [PATCH 03/48] Fix copy --- script/build-storybook | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/script/build-storybook b/script/build-storybook index 876a0d9c7f2..7fae16235cc 100755 --- a/script/build-storybook +++ b/script/build-storybook @@ -6,8 +6,6 @@ cd packages/react # Add base url to be able to serve static files if [ -n "$1" ]; then echo '' >> .storybook/manager-head.html - - cp .storybook/index.html ../../docs/public/storybook else echo '' >> .storybook/manager-head.html fi @@ -15,5 +13,11 @@ fi # Build storybook inside docs npx storybook build -o ../../docs/public/storybook +if [ -n "$1" ]; then + # Move storybook to the right location + cp .storybook/index.html ../../docs/public/storybook/index.html +fi + # Remove manager-head after build to not interfere with dev builds rm .storybook/manager-head.html +rm .storybook/index.html From d6d1dcc1ab1ad274c6b357714552d9843e80f920 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Mon, 6 Jan 2025 16:35:08 -0500 Subject: [PATCH 04/48] Update location --- script/build-storybook | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/build-storybook b/script/build-storybook index 7fae16235cc..34d9faa55e4 100755 --- a/script/build-storybook +++ b/script/build-storybook @@ -14,8 +14,8 @@ fi npx storybook build -o ../../docs/public/storybook if [ -n "$1" ]; then - # Move storybook to the right location - cp .storybook/index.html ../../docs/public/storybook/index.html + # Move index page to the right location + cp .storybook/index.html ../../docs/public/index.html fi # Remove manager-head after build to not interfere with dev builds From cb9c650d11fe9b70f50f03766d050242917f2e2d Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Mon, 6 Jan 2025 16:49:35 -0500 Subject: [PATCH 05/48] Remove if statement --- packages/react/.storybook/index.html | 11 ++++++++--- script/build-storybook | 6 ++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/react/.storybook/index.html b/packages/react/.storybook/index.html index c2b81f36bf4..51a91c1ac69 100644 --- a/packages/react/.storybook/index.html +++ b/packages/react/.storybook/index.html @@ -3,10 +3,15 @@ - Storybook + Primer Preview Page -

Welcome to Storybook

-

Go to Storybook

+

Primer Preview Page

+

Storybook

+ +

Visual Regression Testing

+

Visual Regression Testing (All Flags Enabled)

+

Automated Accessibility Testing

+

Automated Accessibility Testing (All Flags Enabled)

\ No newline at end of file diff --git a/script/build-storybook b/script/build-storybook index 34d9faa55e4..457aeb77f48 100755 --- a/script/build-storybook +++ b/script/build-storybook @@ -13,10 +13,8 @@ fi # Build storybook inside docs npx storybook build -o ../../docs/public/storybook -if [ -n "$1" ]; then - # Move index page to the right location - cp .storybook/index.html ../../docs/public/index.html -fi +# Move index page to the right location +cp .storybook/index.html ../../docs/public/index.html # Remove manager-head after build to not interfere with dev builds rm .storybook/manager-head.html From d021ff39408cf052eb2a86582ab93f3ef9403aec Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Mon, 6 Jan 2025 17:12:46 -0500 Subject: [PATCH 06/48] Add 404 page --- script/build-storybook | 1 + 1 file changed, 1 insertion(+) diff --git a/script/build-storybook b/script/build-storybook index 457aeb77f48..3664ffb0980 100755 --- a/script/build-storybook +++ b/script/build-storybook @@ -15,6 +15,7 @@ npx storybook build -o ../../docs/public/storybook # Move index page to the right location cp .storybook/index.html ../../docs/public/index.html +cp .storybook/index.html ../../docs/public/404.html # Remove manager-head after build to not interfere with dev builds rm .storybook/manager-head.html From 88458d1487d091867b3432913346483d1b74353f Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Mon, 6 Jan 2025 18:20:45 -0500 Subject: [PATCH 07/48] Simple styling --- packages/react/.storybook/index.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/react/.storybook/index.html b/packages/react/.storybook/index.html index 51a91c1ac69..be4e716d506 100644 --- a/packages/react/.storybook/index.html +++ b/packages/react/.storybook/index.html @@ -4,14 +4,18 @@ Primer Preview Page + - +

Primer Preview Page

-

Storybook

- -

Visual Regression Testing

-

Visual Regression Testing (All Flags Enabled)

-

Automated Accessibility Testing

-

Automated Accessibility Testing (All Flags Enabled)

+ \ No newline at end of file From 14da2957fdd8ecb4dc98917c24610b38ccfd63d6 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Tue, 7 Jan 2025 12:29:28 -0500 Subject: [PATCH 08/48] create separate workflow files --- .github/workflows/aat-reports.yml | 166 +++++++++++++++++ .github/workflows/ci.yml | 296 ------------------------------ .github/workflows/vrt-reports.yml | 166 +++++++++++++++++ 3 files changed, 332 insertions(+), 296 deletions(-) create mode 100644 .github/workflows/aat-reports.yml create mode 100644 .github/workflows/vrt-reports.yml diff --git a/.github/workflows/aat-reports.yml b/.github/workflows/aat-reports.yml new file mode 100644 index 00000000000..b180d2e86aa --- /dev/null +++ b/.github/workflows/aat-reports.yml @@ -0,0 +1,166 @@ +name: AAT Reports +on: + push: + branches: + - main + - next-major + pull_request: + merge_group: + branches: + - main + - next-major + types: + - checks_requested + +concurrency: + group: ${{ 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' }} + 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' }} + run: exit 1 \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5db06240809..f78646e2520 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,302 +100,6 @@ jobs: - name: Build run: npm run build -ws --if-present - vrt-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 VRT - 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 @vrt --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: vrt-no-flag-${{ matrix.shard }} - path: blob-report - retention-days: 1 - - vrt: - if: ${{ always() }} - runs-on: ubuntu-latest - needs: vrt-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: vrt-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: vrt-no-flag - path: playwright-report - - name: check vrt-runner job status - if: ${{ needs.vrt-runner.result == 'failure' }} - run: exit 1 - - vrt-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 VRT - 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 @vrt --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: vrt-all-flags-${{ matrix.shard }} - path: blob-report - retention-days: 1 - - vrt-all-flags: - if: ${{ always() }} - runs-on: ubuntu-latest - needs: vrt-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: vrt-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: vrt-all-flags - path: playwright-report - - name: check vrt-runner-all-flags job status - if: ${{ needs.vrt-runner-all-flags.result == 'failure' }} - run: exit 1 - - 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' }} - 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' }} - run: exit 1 - build-components-json: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/vrt-reports.yml b/.github/workflows/vrt-reports.yml new file mode 100644 index 00000000000..6cf45e66af7 --- /dev/null +++ b/.github/workflows/vrt-reports.yml @@ -0,0 +1,166 @@ +name: VRT Reports +on: + push: + branches: + - main + - next-major + pull_request: + merge_group: + branches: + - main + - next-major + types: + - checks_requested + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + vrt-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 VRT + 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 @vrt --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: vrt-no-flag-${{ matrix.shard }} + path: blob-report + retention-days: 1 + + vrt: + if: ${{ always() }} + runs-on: ubuntu-latest + needs: vrt-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: vrt-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: vrt-no-flag + path: playwright-report + - name: check vrt-runner job status + if: ${{ needs.vrt-runner.result == 'failure' }} + run: exit 1 + + vrt-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 VRT + 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 @vrt --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: vrt-all-flags-${{ matrix.shard }} + path: blob-report + retention-days: 1 + + vrt-all-flags: + if: ${{ always() }} + runs-on: ubuntu-latest + needs: vrt-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: vrt-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: vrt-all-flags + path: playwright-report + - name: check vrt-runner-all-flags job status + if: ${{ needs.vrt-runner-all-flags.result == 'failure' }} + run: exit 1 \ No newline at end of file From d23b6f329009fc7573de0fa1358ce16ece877e82 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Tue, 7 Jan 2025 12:31:27 -0500 Subject: [PATCH 09/48] format fix --- .github/workflows/aat-reports.yml | 2 +- .github/workflows/vrt-reports.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/aat-reports.yml b/.github/workflows/aat-reports.yml index b180d2e86aa..066f5b85e4c 100644 --- a/.github/workflows/aat-reports.yml +++ b/.github/workflows/aat-reports.yml @@ -163,4 +163,4 @@ jobs: path: playwright-report - name: Check aat-runner-all-flags job status if: ${{ needs.aat-runner-all-flags.result == 'failure' }} - run: exit 1 \ No newline at end of file + run: exit 1 diff --git a/.github/workflows/vrt-reports.yml b/.github/workflows/vrt-reports.yml index 6cf45e66af7..1b1d0cd6110 100644 --- a/.github/workflows/vrt-reports.yml +++ b/.github/workflows/vrt-reports.yml @@ -163,4 +163,4 @@ jobs: path: playwright-report - name: check vrt-runner-all-flags job status if: ${{ needs.vrt-runner-all-flags.result == 'failure' }} - run: exit 1 \ No newline at end of file + run: exit 1 From 1eeaea7d8df4c775f2c3b9a86042d8688a0b3e30 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Tue, 7 Jan 2025 13:50:09 -0500 Subject: [PATCH 10/48] Download artifacts --- .github/workflows/deploy_preview.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 38d6969f96e..50fd961be74 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -1,5 +1,8 @@ name: Deploy Preview on: + workflow_run: + workflows: ['VRT Reports', 'AAT Reports'] + types: completed pull_request: concurrency: @@ -10,6 +13,7 @@ jobs: build: if: ${{ github.event.pull_request.head.repo.full_name == 'primer/react' }} runs-on: ubuntu-latest + steps: - name: Checkout repository uses: actions/checkout@v4 @@ -26,6 +30,23 @@ jobs: with: name: github-pages path: docs/public + - name: Download VRT reports (All flags enabled) + uses: actions/download-artifact@v3 + with: + name: vrt-all-flags + path: docs/public/vrt-vrt-all-flags + - name: Download VRT reports (No flags enabled) + uses: actions/download-artifact@v3 + with: + name: vrt-no-flag + - name: Download AAT reports (All flags enabled) + uses: actions/download-artifact@v3 + with: + name: aat-all-flags + - name: Download AAT reports (No flags enabled) + uses: actions/download-artifact@v3 + with: + name: aat-no-flag deploy-preview: if: ${{ github.event.pull_request.head.repo.full_name == 'primer/react' }} From f94543ae4f13de1de8af75f0a1e7b66e3ccbba89 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Tue, 7 Jan 2025 13:52:12 -0500 Subject: [PATCH 11/48] format fix --- .github/workflows/deploy_preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 50fd961be74..39d79381ba5 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -13,7 +13,7 @@ jobs: build: if: ${{ github.event.pull_request.head.repo.full_name == 'primer/react' }} runs-on: ubuntu-latest - + steps: - name: Checkout repository uses: actions/checkout@v4 From 162d8d49be750e826004f63ba30cbaf3c2b13dd5 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Tue, 7 Jan 2025 13:56:12 -0500 Subject: [PATCH 12/48] disable pull-requet --- .github/workflows/deploy_preview.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 39d79381ba5..8ef37268a6b 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -3,7 +3,6 @@ on: workflow_run: workflows: ['VRT Reports', 'AAT Reports'] types: completed - pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} From e6717aa2a7bc0c13dad95d93bd756c2808252802 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Tue, 7 Jan 2025 15:05:31 -0500 Subject: [PATCH 13/48] use workflow_call --- .github/workflows/aat-reports.yml | 2 +- .github/workflows/deploy_preview.yml | 19 +++++++++++++++---- .github/workflows/deploy_preview_forks.yml | 6 ++++++ .github/workflows/vrt-reports.yml | 2 +- script/build-storybook | 1 - 5 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/aat-reports.yml b/.github/workflows/aat-reports.yml index 066f5b85e4c..6a8002a81a2 100644 --- a/.github/workflows/aat-reports.yml +++ b/.github/workflows/aat-reports.yml @@ -4,7 +4,7 @@ on: branches: - main - next-major - pull_request: + workflow_call: merge_group: branches: - main diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 8ef37268a6b..948b0bd08d2 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -1,8 +1,6 @@ name: Deploy Preview on: - workflow_run: - workflows: ['VRT Reports', 'AAT Reports'] - types: completed + pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -29,6 +27,19 @@ jobs: with: name: github-pages path: docs/public + + vrt-reports: + uses: ./.github/workflows/vrt-reports.yml + + aat-reports: + uses: ./.github/workflows/aat-reports.yml + + download-artifacts: + if: ${{ github.event.pull_request.head.repo.full_name == 'primer/react' }} + needs: [build, vrt-reports, aat-reports] + runs-on: ubuntu-latest + + steps: - name: Download VRT reports (All flags enabled) uses: actions/download-artifact@v3 with: @@ -49,7 +60,7 @@ jobs: deploy-preview: if: ${{ github.event.pull_request.head.repo.full_name == 'primer/react' }} - needs: build + needs: download-artifacts permissions: pages: write id-token: write diff --git a/.github/workflows/deploy_preview_forks.yml b/.github/workflows/deploy_preview_forks.yml index 98a033ec12b..4b8ca45d6cf 100644 --- a/.github/workflows/deploy_preview_forks.yml +++ b/.github/workflows/deploy_preview_forks.yml @@ -28,6 +28,12 @@ jobs: name: github-pages path: docs/public + vrt-reports: + uses: ./.github/workflows/vrt-reports.yml + + aat-reports: + uses: ./.github/workflows/aat-reports.yml + deploy-preview: if: ${{ github.repository != github.event.pull_request.head.repo.full_name }} needs: build diff --git a/.github/workflows/vrt-reports.yml b/.github/workflows/vrt-reports.yml index 1b1d0cd6110..0720c744d43 100644 --- a/.github/workflows/vrt-reports.yml +++ b/.github/workflows/vrt-reports.yml @@ -4,7 +4,7 @@ on: branches: - main - next-major - pull_request: + workflow_call: merge_group: branches: - main diff --git a/script/build-storybook b/script/build-storybook index 3664ffb0980..457aeb77f48 100755 --- a/script/build-storybook +++ b/script/build-storybook @@ -15,7 +15,6 @@ npx storybook build -o ../../docs/public/storybook # Move index page to the right location cp .storybook/index.html ../../docs/public/index.html -cp .storybook/index.html ../../docs/public/404.html # Remove manager-head after build to not interfere with dev builds rm .storybook/manager-head.html From c83778c54c3ee07b3ded0ab8278a287c4db08fde Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Tue, 7 Jan 2025 15:12:04 -0500 Subject: [PATCH 14/48] update concurrency group --- .github/workflows/aat-reports.yml | 2 +- .github/workflows/vrt-reports.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/aat-reports.yml b/.github/workflows/aat-reports.yml index 6a8002a81a2..ffe05116fda 100644 --- a/.github/workflows/aat-reports.yml +++ b/.github/workflows/aat-reports.yml @@ -13,7 +13,7 @@ on: - checks_requested concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: aat-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/vrt-reports.yml b/.github/workflows/vrt-reports.yml index 0720c744d43..8751b8e770a 100644 --- a/.github/workflows/vrt-reports.yml +++ b/.github/workflows/vrt-reports.yml @@ -13,7 +13,7 @@ on: - checks_requested concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: vrt-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: From a37676a2e801b3d878e09a82d7d5ae2e50dde11b Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Tue, 7 Jan 2025 15:37:34 -0500 Subject: [PATCH 15/48] update paths --- .github/workflows/deploy_preview.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 948b0bd08d2..a4549a92787 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -44,19 +44,22 @@ jobs: uses: actions/download-artifact@v3 with: name: vrt-all-flags - path: docs/public/vrt-vrt-all-flags + path: docs/public/vrt-all-flags - name: Download VRT reports (No flags enabled) uses: actions/download-artifact@v3 with: name: vrt-no-flag + path: docs/public/vrt-no-flag - name: Download AAT reports (All flags enabled) uses: actions/download-artifact@v3 with: name: aat-all-flags + path: docs/public/aat-all-flags - name: Download AAT reports (No flags enabled) uses: actions/download-artifact@v3 with: name: aat-no-flag + path: docs/public/aat-no-flag deploy-preview: if: ${{ github.event.pull_request.head.repo.full_name == 'primer/react' }} From dc43e5d457ccd0bf2e7c8f5d2ca347f879081c74 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Tue, 7 Jan 2025 15:41:35 -0500 Subject: [PATCH 16/48] rework workflow --- .github/workflows/deploy_preview.yml | 30 +++++++++++----------------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index a4549a92787..1c97aed7a79 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -7,8 +7,15 @@ concurrency: cancel-in-progress: true jobs: + vrt-reports: + uses: ./.github/workflows/vrt-reports.yml + + aat-reports: + uses: ./.github/workflows/aat-reports.yml + build: if: ${{ github.event.pull_request.head.repo.full_name == 'primer/react' }} + needs: [vrt-reports, aat-reports] runs-on: ubuntu-latest steps: @@ -23,23 +30,6 @@ jobs: run: npm ci - name: Build docs preview run: npm run build:docs:preview - - uses: actions/upload-pages-artifact@v3 - with: - name: github-pages - path: docs/public - - vrt-reports: - uses: ./.github/workflows/vrt-reports.yml - - aat-reports: - uses: ./.github/workflows/aat-reports.yml - - download-artifacts: - if: ${{ github.event.pull_request.head.repo.full_name == 'primer/react' }} - needs: [build, vrt-reports, aat-reports] - runs-on: ubuntu-latest - - steps: - name: Download VRT reports (All flags enabled) uses: actions/download-artifact@v3 with: @@ -60,10 +50,14 @@ jobs: with: name: aat-no-flag path: docs/public/aat-no-flag + - uses: actions/upload-pages-artifact@v3 + with: + name: github-pages + path: docs/public deploy-preview: if: ${{ github.event.pull_request.head.repo.full_name == 'primer/react' }} - needs: download-artifacts + needs: build permissions: pages: write id-token: write From bfff2204b836fefaabe27061bdad67d7cbb4ca05 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Tue, 7 Jan 2025 15:43:27 -0500 Subject: [PATCH 17/48] add conditional --- .github/workflows/deploy_preview.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 1c97aed7a79..5520ef71c35 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -8,9 +8,11 @@ concurrency: jobs: vrt-reports: + if: ${{ github.event.pull_request.head.repo.full_name == 'primer/react' }} uses: ./.github/workflows/vrt-reports.yml aat-reports: + if: ${{ github.event.pull_request.head.repo.full_name == 'primer/react' }} uses: ./.github/workflows/aat-reports.yml build: From a7e41ff9743c74c7b11ecbfea08f3d858af18097 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Tue, 7 Jan 2025 17:46:12 -0500 Subject: [PATCH 18/48] update version --- .github/workflows/deploy_preview.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 5520ef71c35..5c9af7596be 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -33,22 +33,22 @@ jobs: - name: Build docs preview run: npm run build:docs:preview - name: Download VRT reports (All flags enabled) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: vrt-all-flags path: docs/public/vrt-all-flags - name: Download VRT reports (No flags enabled) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: vrt-no-flag path: docs/public/vrt-no-flag - name: Download AAT reports (All flags enabled) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: aat-all-flags path: docs/public/aat-all-flags - name: Download AAT reports (No flags enabled) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: aat-no-flag path: docs/public/aat-no-flag From a708934363f3afb3f781c346822c1bb2dcb64ce6 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Tue, 7 Jan 2025 18:00:54 -0500 Subject: [PATCH 19/48] update artifact name --- .github/workflows/deploy_preview.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 5c9af7596be..39c2a1070e3 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -45,12 +45,12 @@ jobs: - name: Download AAT reports (All flags enabled) uses: actions/download-artifact@v4 with: - name: aat-all-flags + name: axe-all-flags path: docs/public/aat-all-flags - name: Download AAT reports (No flags enabled) uses: actions/download-artifact@v4 with: - name: aat-no-flag + name: axe path: docs/public/aat-no-flag - uses: actions/upload-pages-artifact@v3 with: From 1b07d6e15ff95a63a6b799d6937eeb8d8a19980f Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Tue, 7 Jan 2025 18:21:09 -0500 Subject: [PATCH 20/48] test vrt fail --- packages/react/src/PageHeader/PageHeader.module.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/PageHeader/PageHeader.module.css b/packages/react/src/PageHeader/PageHeader.module.css index 1d84ab75981..c9770276e6e 100644 --- a/packages/react/src/PageHeader/PageHeader.module.css +++ b/packages/react/src/PageHeader/PageHeader.module.css @@ -91,7 +91,7 @@ .ContextArea { display: flex; - padding-bottom: var(--base-size-8); + padding-bottom: var(--base-size-24); font-size: var(--text-body-size-medium, 0.875rem); font-weight: var(--base-text-weight-light); line-height: var(--text-body-lineHeight-medium, 1.4285); From d1ecd46c18d88990579c5572ebdcfd1887704568 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Tue, 7 Jan 2025 18:52:27 -0500 Subject: [PATCH 21/48] test vrt fail --- packages/react/src/Button/ButtonBase.module.css | 4 ++-- packages/react/src/PageHeader/PageHeader.module.css | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react/src/Button/ButtonBase.module.css b/packages/react/src/Button/ButtonBase.module.css index 3df7e8c1e48..b3fe47d307b 100644 --- a/packages/react/src/Button/ButtonBase.module.css +++ b/packages/react/src/Button/ButtonBase.module.css @@ -15,8 +15,8 @@ user-select: none; background-color: transparent; border: var(--borderWidth-thin) solid; - border-color: var(--button-default-borderColor-rest); - border-radius: var(--borderRadius-medium); + border-color: var(--button-danger-borderColor-active); + border-radius: var(--borderRadius-large); transition: 80ms cubic-bezier(0.65, 0, 0.35, 1); transition-property: color, fill, background-color, border-color; appearance: none; diff --git a/packages/react/src/PageHeader/PageHeader.module.css b/packages/react/src/PageHeader/PageHeader.module.css index c9770276e6e..1d84ab75981 100644 --- a/packages/react/src/PageHeader/PageHeader.module.css +++ b/packages/react/src/PageHeader/PageHeader.module.css @@ -91,7 +91,7 @@ .ContextArea { display: flex; - padding-bottom: var(--base-size-24); + padding-bottom: var(--base-size-8); font-size: var(--text-body-size-medium, 0.875rem); font-weight: var(--base-text-weight-light); line-height: var(--text-body-lineHeight-medium, 1.4285); From e3ea47061f95c851ee1103dd90d4f13c15a89f11 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Wed, 8 Jan 2025 12:02:58 -0500 Subject: [PATCH 22/48] continue on error --- .github/workflows/aat-reports.yml | 2 ++ .github/workflows/vrt-reports.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/aat-reports.yml b/.github/workflows/aat-reports.yml index ffe05116fda..da332f6ef06 100644 --- a/.github/workflows/aat-reports.yml +++ b/.github/workflows/aat-reports.yml @@ -87,6 +87,7 @@ jobs: 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: @@ -163,4 +164,5 @@ jobs: 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 diff --git a/.github/workflows/vrt-reports.yml b/.github/workflows/vrt-reports.yml index 8751b8e770a..2606945c8a7 100644 --- a/.github/workflows/vrt-reports.yml +++ b/.github/workflows/vrt-reports.yml @@ -87,6 +87,7 @@ jobs: path: playwright-report - name: check vrt-runner job status if: ${{ needs.vrt-runner.result == 'failure' }} + continue-on-error: true run: exit 1 vrt-runner-all-flags: @@ -163,4 +164,5 @@ jobs: path: playwright-report - name: check vrt-runner-all-flags job status if: ${{ needs.vrt-runner-all-flags.result == 'failure' }} + continue-on-error: true run: exit 1 From d799e78ae4fc0e05e1e86455a3bcabb007609fd9 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Wed, 8 Jan 2025 12:37:06 -0500 Subject: [PATCH 23/48] skip download if failed --- .github/workflows/deploy_preview.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 39c2a1070e3..baf1c5c5636 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -33,21 +33,25 @@ jobs: - name: Build docs preview run: npm run build:docs:preview - name: Download VRT reports (All flags enabled) + if: ${{ needs.vrt-reports.result == 'success' }} uses: actions/download-artifact@v4 with: name: vrt-all-flags path: docs/public/vrt-all-flags - name: Download VRT reports (No flags enabled) + if: ${{ needs.vrt-reports.result == 'success' }} uses: actions/download-artifact@v4 with: name: vrt-no-flag path: docs/public/vrt-no-flag - name: Download AAT reports (All flags enabled) + if: ${{ needs.aat-reports.result == 'success' }} uses: actions/download-artifact@v4 with: name: axe-all-flags path: docs/public/aat-all-flags - name: Download AAT reports (No flags enabled) + if: ${{ needs.aat-reports.result == 'success' }} uses: actions/download-artifact@v4 with: name: axe From 01934941d817c6267cb009c8e7f4bcc554f5c9e2 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Wed, 8 Jan 2025 13:10:35 -0500 Subject: [PATCH 24/48] revert css change --- packages/react/src/Button/ButtonBase.module.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/src/Button/ButtonBase.module.css b/packages/react/src/Button/ButtonBase.module.css index b3fe47d307b..3df7e8c1e48 100644 --- a/packages/react/src/Button/ButtonBase.module.css +++ b/packages/react/src/Button/ButtonBase.module.css @@ -15,8 +15,8 @@ user-select: none; background-color: transparent; border: var(--borderWidth-thin) solid; - border-color: var(--button-danger-borderColor-active); - border-radius: var(--borderRadius-large); + border-color: var(--button-default-borderColor-rest); + border-radius: var(--borderRadius-medium); transition: 80ms cubic-bezier(0.65, 0, 0.35, 1); transition-property: color, fill, background-color, border-color; appearance: none; From 2aac5271e942c8d00733a751510437baf7296a4a Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Wed, 8 Jan 2025 14:05:50 -0500 Subject: [PATCH 25/48] add always --- .github/workflows/deploy_preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index baf1c5c5636..51925b5ee66 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -16,7 +16,7 @@ jobs: uses: ./.github/workflows/aat-reports.yml build: - if: ${{ github.event.pull_request.head.repo.full_name == 'primer/react' }} + if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} needs: [vrt-reports, aat-reports] runs-on: ubuntu-latest From 20b2de0019aa12603a01e4bc582cc769082aacc2 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Wed, 8 Jan 2025 14:36:20 -0500 Subject: [PATCH 26/48] add always --- .github/workflows/deploy_preview.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 51925b5ee66..57a881d0ba0 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -62,7 +62,7 @@ jobs: path: docs/public deploy-preview: - if: ${{ github.event.pull_request.head.repo.full_name == 'primer/react' }} + if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} needs: build permissions: pages: write @@ -82,7 +82,7 @@ jobs: deploy-storybook: name: Preview Storybook - if: ${{ github.event.pull_request.head.repo.full_name == 'primer/react' }} + if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} needs: deploy-preview permissions: deployments: write From 3f5ea178d72413d59d8a7ebc87065f9c51653963 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Wed, 8 Jan 2025 15:23:51 -0500 Subject: [PATCH 27/48] simple styling --- packages/react/.storybook/index.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/react/.storybook/index.html b/packages/react/.storybook/index.html index be4e716d506..9bedaec25db 100644 --- a/packages/react/.storybook/index.html +++ b/packages/react/.storybook/index.html @@ -7,14 +7,18 @@ -

Primer Preview Page

+
+

Primer Preview Page

+
From d29843f3b1b4d7e35077fe60251fc672f78dcbd7 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Wed, 8 Jan 2025 15:30:42 -0500 Subject: [PATCH 28/48] add deployments --- .github/workflows/deploy_preview.yml | 124 +++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 57a881d0ba0..e343c83130d 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -110,3 +110,127 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} state: 'failure' deployment-id: ${{ steps.storybook.outputs.deployment_id }} + + deploy-vrt-no-flag: + name: VRT (No flags enabled) + if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} + needs: deploy-preview + permissions: + deployments: write + runs-on: ubuntu-latest + steps: + - uses: chrnorm/deployment-action@v2.0.7 + name: Create GitHub deployment for vrt-no-flag + id: vrt-no-flag + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: storybook-preview-${{ github.event.number }} + environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' + - name: Update vrt-no-flag deployment status (success) + if: success() + uses: chrnorm/deployment-status@v2.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' + state: 'success' + deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }} + - name: Update vrt-no-flag deployment status (failure) + if: failure() + uses: chrnorm/deployment-status@v2.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + state: 'failure' + deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }} + + deploy-vrt-all-flags: + name: VRT (All flags enabled) + if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} + needs: deploy-preview + permissions: + deployments: write + runs-on: ubuntu-latest + steps: + - uses: chrnorm/deployment-action@v2.0.7 + name: Create GitHub deployment for vrt-all-flags + id: vrt-all-flags + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: storybook-preview-${{ github.event.number }} + environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags' + - name: Update vrt-all-flags deployment status (success) + if: success() + uses: chrnorm/deployment-status@v2.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags' + state: 'success' + deployment-id: ${{ steps.vrt-all-flags.outputs.deployment_id }} + - name: Update vrt-all-flags deployment status (failure) + if: failure() + uses: chrnorm/deployment-status@v2.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + state: 'failure' + deployment-id: ${{ steps.vrt-all-flags.outputs.deployment_id }} + + deploy-aat-no-flag: + name: AAT (No flags enabled) + if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} + needs: deploy-preview + permissions: + deployments: write + runs-on: ubuntu-latest + steps: + - uses: chrnorm/deployment-action@v2.0.7 + name: Create GitHub deployment for aat-no-flag + id: aat-no-flag + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: storybook-preview-${{ github.event.number }} + environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag' + - name: Update aat-no-flag deployment status (success) + if: success() + uses: chrnorm/deployment-status@v2.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag' + state: 'success' + deployment-id: ${{ steps.aat-no-flag.outputs.deployment_id }} + - name: Update aat-no-flag deployment status (failure) + if: failure() + uses: chrnorm/deployment-status@v2.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + state: 'failure' + deployment-id: ${{ steps.aat-no-flag.outputs.deployment_id }} + + deploy-aat-all-flags: + name: AAT (All flags enabled) + if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} + needs: deploy-preview + permissions: + deployments: write + runs-on: ubuntu-latest + steps: + - uses: chrnorm/deployment-action@v2.0.7 + name: Create GitHub deployment for aat-all-flags + id: aat-all-flags + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: storybook-preview-${{ github.event.number }} + environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags' + - name: Update aat-all-flags deployment status (success) + if: success() + uses: chrnorm/deployment-status@v2.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags' + state: 'success' + deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }} + - name: Update aat-all-flags deployment status (failure) + if: failure() + uses: chrnorm/deployment-status@v2.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + state: 'failure' + deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }} \ No newline at end of file From 2fa3e98bff23df886d5d1419be815315f2a77baa Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Wed, 8 Jan 2025 15:45:58 -0500 Subject: [PATCH 29/48] update env names --- .github/workflows/aat-reports.yml | 5 +++++ .github/workflows/deploy_preview.yml | 24 ++++++++++++------------ .github/workflows/vrt-reports.yml | 5 +++++ 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/aat-reports.yml b/.github/workflows/aat-reports.yml index da332f6ef06..1b5194137fb 100644 --- a/.github/workflows/aat-reports.yml +++ b/.github/workflows/aat-reports.yml @@ -5,6 +5,11 @@ on: - 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 diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index e343c83130d..470837aa54b 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -114,7 +114,7 @@ jobs: deploy-vrt-no-flag: name: VRT (No flags enabled) if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} - needs: deploy-preview + needs: [vrt-reports, deploy-preview] permissions: deployments: write runs-on: ubuntu-latest @@ -124,7 +124,7 @@ jobs: id: vrt-no-flag with: token: ${{ secrets.GITHUB_TOKEN }} - environment: storybook-preview-${{ github.event.number }} + environment: vrt-no-flag--${{ github.event.number }} environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' - name: Update vrt-no-flag deployment status (success) if: success() @@ -132,7 +132,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' - state: 'success' + state: ${{ needs.vrt-reports.outputs.vrt-no-flag }} deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }} - name: Update vrt-no-flag deployment status (failure) if: failure() @@ -145,7 +145,7 @@ jobs: deploy-vrt-all-flags: name: VRT (All flags enabled) if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} - needs: deploy-preview + needs: [vrt-reports, deploy-preview] permissions: deployments: write runs-on: ubuntu-latest @@ -155,7 +155,7 @@ jobs: id: vrt-all-flags with: token: ${{ secrets.GITHUB_TOKEN }} - environment: storybook-preview-${{ github.event.number }} + environment: vrt-all-flags-${{ github.event.number }} environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags' - name: Update vrt-all-flags deployment status (success) if: success() @@ -163,7 +163,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags' - state: 'success' + state: ${{ needs.vrt-reports.outputs.vrt-all-flags }} deployment-id: ${{ steps.vrt-all-flags.outputs.deployment_id }} - name: Update vrt-all-flags deployment status (failure) if: failure() @@ -176,7 +176,7 @@ jobs: deploy-aat-no-flag: name: AAT (No flags enabled) if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} - needs: deploy-preview + needs: [aat-reports, deploy-preview] permissions: deployments: write runs-on: ubuntu-latest @@ -186,7 +186,7 @@ jobs: id: aat-no-flag with: token: ${{ secrets.GITHUB_TOKEN }} - environment: storybook-preview-${{ github.event.number }} + environment: aat-no-flag-${{ github.event.number }} environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag' - name: Update aat-no-flag deployment status (success) if: success() @@ -194,7 +194,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag' - state: 'success' + state: ${{ needs.aat-reports.outputs.aat-no-flag }} deployment-id: ${{ steps.aat-no-flag.outputs.deployment_id }} - name: Update aat-no-flag deployment status (failure) if: failure() @@ -207,7 +207,7 @@ jobs: deploy-aat-all-flags: name: AAT (All flags enabled) if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} - needs: deploy-preview + needs: [aat-reports, deploy-preview] permissions: deployments: write runs-on: ubuntu-latest @@ -217,7 +217,7 @@ jobs: id: aat-all-flags with: token: ${{ secrets.GITHUB_TOKEN }} - environment: storybook-preview-${{ github.event.number }} + environment: aat-all-flags-${{ github.event.number }} environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags' - name: Update aat-all-flags deployment status (success) if: success() @@ -225,7 +225,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags' - state: 'success' + state: ${{ needs.aat-reports.outputs.aat-all-flags }} deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }} - name: Update aat-all-flags deployment status (failure) if: failure() diff --git a/.github/workflows/vrt-reports.yml b/.github/workflows/vrt-reports.yml index 2606945c8a7..f411a33b488 100644 --- a/.github/workflows/vrt-reports.yml +++ b/.github/workflows/vrt-reports.yml @@ -5,6 +5,11 @@ on: - main - next-major workflow_call: + outputs: + aat-all-flags: + value: ${{ jobs.vrt-all-flags.result }} + aat-no-flag: + value: ${{ jobs.vrt.result }} merge_group: branches: - main From 75fb124a96fec18e5d661342ac8c7447b372c28c Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Wed, 8 Jan 2025 18:21:14 -0500 Subject: [PATCH 30/48] format fix --- .github/workflows/deploy_preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 470837aa54b..478a6dc0774 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -233,4 +233,4 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} state: 'failure' - deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }} \ No newline at end of file + deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }} From c4810532787ac2e713268e1bb39f78a3a7ca391c Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Wed, 8 Jan 2025 18:51:25 -0500 Subject: [PATCH 31/48] reset state --- .github/workflows/deploy_preview.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 478a6dc0774..d01bb993a6b 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -132,7 +132,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' - state: ${{ needs.vrt-reports.outputs.vrt-no-flag }} + state: 'success' deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }} - name: Update vrt-no-flag deployment status (failure) if: failure() @@ -163,7 +163,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags' - state: ${{ needs.vrt-reports.outputs.vrt-all-flags }} + state: 'success' deployment-id: ${{ steps.vrt-all-flags.outputs.deployment_id }} - name: Update vrt-all-flags deployment status (failure) if: failure() @@ -194,7 +194,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag' - state: ${{ needs.aat-reports.outputs.aat-no-flag }} + state: 'success' deployment-id: ${{ steps.aat-no-flag.outputs.deployment_id }} - name: Update aat-no-flag deployment status (failure) if: failure() @@ -225,7 +225,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags' - state: ${{ needs.aat-reports.outputs.aat-all-flags }} + state: 'success' deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }} - name: Update aat-all-flags deployment status (failure) if: failure() From 1ad7e8e4a02166b2790d76c4627cb085d7e25b2f Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Wed, 8 Jan 2025 19:01:49 -0500 Subject: [PATCH 32/48] force vrt fail --- packages/react/src/Button/ButtonBase.module.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/src/Button/ButtonBase.module.css b/packages/react/src/Button/ButtonBase.module.css index 3df7e8c1e48..b3fe47d307b 100644 --- a/packages/react/src/Button/ButtonBase.module.css +++ b/packages/react/src/Button/ButtonBase.module.css @@ -15,8 +15,8 @@ user-select: none; background-color: transparent; border: var(--borderWidth-thin) solid; - border-color: var(--button-default-borderColor-rest); - border-radius: var(--borderRadius-medium); + border-color: var(--button-danger-borderColor-active); + border-radius: var(--borderRadius-large); transition: 80ms cubic-bezier(0.65, 0, 0.35, 1); transition-property: color, fill, background-color, border-color; appearance: none; From e9da6cd7f839440baf80d186084ddbe0cf6c5371 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Thu, 9 Jan 2025 11:43:50 -0500 Subject: [PATCH 33/48] fix css --- packages/react/src/Button/ButtonBase.module.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/src/Button/ButtonBase.module.css b/packages/react/src/Button/ButtonBase.module.css index b3fe47d307b..3df7e8c1e48 100644 --- a/packages/react/src/Button/ButtonBase.module.css +++ b/packages/react/src/Button/ButtonBase.module.css @@ -15,8 +15,8 @@ user-select: none; background-color: transparent; border: var(--borderWidth-thin) solid; - border-color: var(--button-danger-borderColor-active); - border-radius: var(--borderRadius-large); + border-color: var(--button-default-borderColor-rest); + border-radius: var(--borderRadius-medium); transition: 80ms cubic-bezier(0.65, 0, 0.35, 1); transition-property: color, fill, background-color, border-color; appearance: none; From b454071637e05b623c3fcc9f43fbe9db249d3831 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Thu, 9 Jan 2025 12:20:15 -0500 Subject: [PATCH 34/48] disable deployments --- .github/workflows/deploy_preview.yml | 240 +++++++++++++-------------- 1 file changed, 120 insertions(+), 120 deletions(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index d01bb993a6b..b5f80fe2e0b 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -111,126 +111,126 @@ jobs: state: 'failure' deployment-id: ${{ steps.storybook.outputs.deployment_id }} - deploy-vrt-no-flag: - name: VRT (No flags enabled) - if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} - needs: [vrt-reports, deploy-preview] - permissions: - deployments: write - runs-on: ubuntu-latest - steps: - - uses: chrnorm/deployment-action@v2.0.7 - name: Create GitHub deployment for vrt-no-flag - id: vrt-no-flag - with: - token: ${{ secrets.GITHUB_TOKEN }} - environment: vrt-no-flag--${{ github.event.number }} - environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' - - name: Update vrt-no-flag deployment status (success) - if: success() - uses: chrnorm/deployment-status@v2.0.3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' - state: 'success' - deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }} - - name: Update vrt-no-flag deployment status (failure) - if: failure() - uses: chrnorm/deployment-status@v2.0.3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - state: 'failure' - deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }} + # deploy-vrt-no-flag: + # name: VRT (No flags enabled) + # if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} + # needs: [vrt-reports, deploy-preview] + # permissions: + # deployments: write + # runs-on: ubuntu-latest + # steps: + # - uses: chrnorm/deployment-action@v2.0.7 + # name: Create GitHub deployment for vrt-no-flag + # id: vrt-no-flag + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # environment: vrt-no-flag--${{ github.event.number }} + # environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' + # - name: Update vrt-no-flag deployment status (success) + # if: success() + # uses: chrnorm/deployment-status@v2.0.3 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' + # state: 'success' + # deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }} + # - name: Update vrt-no-flag deployment status (failure) + # if: failure() + # uses: chrnorm/deployment-status@v2.0.3 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # state: 'failure' + # deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }} - deploy-vrt-all-flags: - name: VRT (All flags enabled) - if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} - needs: [vrt-reports, deploy-preview] - permissions: - deployments: write - runs-on: ubuntu-latest - steps: - - uses: chrnorm/deployment-action@v2.0.7 - name: Create GitHub deployment for vrt-all-flags - id: vrt-all-flags - with: - token: ${{ secrets.GITHUB_TOKEN }} - environment: vrt-all-flags-${{ github.event.number }} - environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags' - - name: Update vrt-all-flags deployment status (success) - if: success() - uses: chrnorm/deployment-status@v2.0.3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags' - state: 'success' - deployment-id: ${{ steps.vrt-all-flags.outputs.deployment_id }} - - name: Update vrt-all-flags deployment status (failure) - if: failure() - uses: chrnorm/deployment-status@v2.0.3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - state: 'failure' - deployment-id: ${{ steps.vrt-all-flags.outputs.deployment_id }} + # deploy-vrt-all-flags: + # name: VRT (All flags enabled) + # if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} + # needs: [vrt-reports, deploy-preview] + # permissions: + # deployments: write + # runs-on: ubuntu-latest + # steps: + # - uses: chrnorm/deployment-action@v2.0.7 + # name: Create GitHub deployment for vrt-all-flags + # id: vrt-all-flags + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # environment: vrt-all-flags-${{ github.event.number }} + # environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags' + # - name: Update vrt-all-flags deployment status (success) + # if: success() + # uses: chrnorm/deployment-status@v2.0.3 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags' + # state: 'success' + # deployment-id: ${{ steps.vrt-all-flags.outputs.deployment_id }} + # - name: Update vrt-all-flags deployment status (failure) + # if: failure() + # uses: chrnorm/deployment-status@v2.0.3 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # state: 'failure' + # deployment-id: ${{ steps.vrt-all-flags.outputs.deployment_id }} - deploy-aat-no-flag: - name: AAT (No flags enabled) - if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} - needs: [aat-reports, deploy-preview] - permissions: - deployments: write - runs-on: ubuntu-latest - steps: - - uses: chrnorm/deployment-action@v2.0.7 - name: Create GitHub deployment for aat-no-flag - id: aat-no-flag - with: - token: ${{ secrets.GITHUB_TOKEN }} - environment: aat-no-flag-${{ github.event.number }} - environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag' - - name: Update aat-no-flag deployment status (success) - if: success() - uses: chrnorm/deployment-status@v2.0.3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag' - state: 'success' - deployment-id: ${{ steps.aat-no-flag.outputs.deployment_id }} - - name: Update aat-no-flag deployment status (failure) - if: failure() - uses: chrnorm/deployment-status@v2.0.3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - state: 'failure' - deployment-id: ${{ steps.aat-no-flag.outputs.deployment_id }} + # deploy-aat-no-flag: + # name: AAT (No flags enabled) + # if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} + # needs: [aat-reports, deploy-preview] + # permissions: + # deployments: write + # runs-on: ubuntu-latest + # steps: + # - uses: chrnorm/deployment-action@v2.0.7 + # name: Create GitHub deployment for aat-no-flag + # id: aat-no-flag + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # environment: aat-no-flag-${{ github.event.number }} + # environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag' + # - name: Update aat-no-flag deployment status (success) + # if: success() + # uses: chrnorm/deployment-status@v2.0.3 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag' + # state: 'success' + # deployment-id: ${{ steps.aat-no-flag.outputs.deployment_id }} + # - name: Update aat-no-flag deployment status (failure) + # if: failure() + # uses: chrnorm/deployment-status@v2.0.3 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # state: 'failure' + # deployment-id: ${{ steps.aat-no-flag.outputs.deployment_id }} - deploy-aat-all-flags: - name: AAT (All flags enabled) - if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} - needs: [aat-reports, deploy-preview] - permissions: - deployments: write - runs-on: ubuntu-latest - steps: - - uses: chrnorm/deployment-action@v2.0.7 - name: Create GitHub deployment for aat-all-flags - id: aat-all-flags - with: - token: ${{ secrets.GITHUB_TOKEN }} - environment: aat-all-flags-${{ github.event.number }} - environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags' - - name: Update aat-all-flags deployment status (success) - if: success() - uses: chrnorm/deployment-status@v2.0.3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags' - state: 'success' - deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }} - - name: Update aat-all-flags deployment status (failure) - if: failure() - uses: chrnorm/deployment-status@v2.0.3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - state: 'failure' - deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }} + # deploy-aat-all-flags: + # name: AAT (All flags enabled) + # if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} + # needs: [aat-reports, deploy-preview] + # permissions: + # deployments: write + # runs-on: ubuntu-latest + # steps: + # - uses: chrnorm/deployment-action@v2.0.7 + # name: Create GitHub deployment for aat-all-flags + # id: aat-all-flags + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # environment: aat-all-flags-${{ github.event.number }} + # environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags' + # - name: Update aat-all-flags deployment status (success) + # if: success() + # uses: chrnorm/deployment-status@v2.0.3 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags' + # state: 'success' + # deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }} + # - name: Update aat-all-flags deployment status (failure) + # if: failure() + # uses: chrnorm/deployment-status@v2.0.3 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # state: 'failure' + # deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }} From 7a139aa0e61bbf958cf9d1582397b0d26e976119 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Thu, 9 Jan 2025 12:30:29 -0500 Subject: [PATCH 35/48] vrt fail --- packages/react/src/Button/ButtonBase.module.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/src/Button/ButtonBase.module.css b/packages/react/src/Button/ButtonBase.module.css index 3df7e8c1e48..b3fe47d307b 100644 --- a/packages/react/src/Button/ButtonBase.module.css +++ b/packages/react/src/Button/ButtonBase.module.css @@ -15,8 +15,8 @@ user-select: none; background-color: transparent; border: var(--borderWidth-thin) solid; - border-color: var(--button-default-borderColor-rest); - border-radius: var(--borderRadius-medium); + border-color: var(--button-danger-borderColor-active); + border-radius: var(--borderRadius-large); transition: 80ms cubic-bezier(0.65, 0, 0.35, 1); transition-property: color, fill, background-color, border-color; appearance: none; From 000251583b48a89b0719c0a36f62c0558534917d Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Thu, 9 Jan 2025 12:46:36 -0500 Subject: [PATCH 36/48] remove if statements --- .github/workflows/deploy_preview.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index b5f80fe2e0b..9d41d17faaa 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -33,25 +33,21 @@ jobs: - name: Build docs preview run: npm run build:docs:preview - name: Download VRT reports (All flags enabled) - if: ${{ needs.vrt-reports.result == 'success' }} uses: actions/download-artifact@v4 with: name: vrt-all-flags path: docs/public/vrt-all-flags - name: Download VRT reports (No flags enabled) - if: ${{ needs.vrt-reports.result == 'success' }} uses: actions/download-artifact@v4 with: name: vrt-no-flag path: docs/public/vrt-no-flag - name: Download AAT reports (All flags enabled) - if: ${{ needs.aat-reports.result == 'success' }} uses: actions/download-artifact@v4 with: name: axe-all-flags path: docs/public/aat-all-flags - name: Download AAT reports (No flags enabled) - if: ${{ needs.aat-reports.result == 'success' }} uses: actions/download-artifact@v4 with: name: axe From 0afa2196acd0376334fc0cafd1d4cb78c554d150 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Thu, 9 Jan 2025 13:02:30 -0500 Subject: [PATCH 37/48] fix css --- packages/react/src/Button/ButtonBase.module.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/src/Button/ButtonBase.module.css b/packages/react/src/Button/ButtonBase.module.css index b3fe47d307b..3df7e8c1e48 100644 --- a/packages/react/src/Button/ButtonBase.module.css +++ b/packages/react/src/Button/ButtonBase.module.css @@ -15,8 +15,8 @@ user-select: none; background-color: transparent; border: var(--borderWidth-thin) solid; - border-color: var(--button-danger-borderColor-active); - border-radius: var(--borderRadius-large); + border-color: var(--button-default-borderColor-rest); + border-radius: var(--borderRadius-medium); transition: 80ms cubic-bezier(0.65, 0, 0.35, 1); transition-property: color, fill, background-color, border-color; appearance: none; From e9f161d5f145dddf6fd20d488f857c767fd051f6 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Thu, 9 Jan 2025 13:13:23 -0500 Subject: [PATCH 38/48] try readding deployment --- .github/workflows/deploy_preview.yml | 60 ++++++++++++++-------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 9d41d17faaa..4f86fd45108 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -107,36 +107,36 @@ jobs: state: 'failure' deployment-id: ${{ steps.storybook.outputs.deployment_id }} - # deploy-vrt-no-flag: - # name: VRT (No flags enabled) - # if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} - # needs: [vrt-reports, deploy-preview] - # permissions: - # deployments: write - # runs-on: ubuntu-latest - # steps: - # - uses: chrnorm/deployment-action@v2.0.7 - # name: Create GitHub deployment for vrt-no-flag - # id: vrt-no-flag - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # environment: vrt-no-flag--${{ github.event.number }} - # environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' - # - name: Update vrt-no-flag deployment status (success) - # if: success() - # uses: chrnorm/deployment-status@v2.0.3 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' - # state: 'success' - # deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }} - # - name: Update vrt-no-flag deployment status (failure) - # if: failure() - # uses: chrnorm/deployment-status@v2.0.3 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # state: 'failure' - # deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }} + deploy-vrt-no-flag: + name: VRT (No flags enabled) + if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} + needs: [deploy-preview] + permissions: + deployments: write + runs-on: ubuntu-latest + steps: + - uses: chrnorm/deployment-action@v2.0.7 + name: Create GitHub deployment for vrt-no-flag + id: vrt-no-flag + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: vrt-no-flag--${{ github.event.number }} + environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' + - name: Update vrt-no-flag deployment status (success) + if: success() + uses: chrnorm/deployment-status@v2.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' + state: 'success' + deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }} + - name: Update vrt-no-flag deployment status (failure) + if: failure() + uses: chrnorm/deployment-status@v2.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + state: 'failure' + deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }} # deploy-vrt-all-flags: # name: VRT (All flags enabled) From 4a00c2669786e95e58fe2e38369eb25ea6311810 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Thu, 9 Jan 2025 13:44:02 -0500 Subject: [PATCH 39/48] reenable all deployments --- .github/workflows/deploy_preview.yml | 182 +++++++++++++-------------- 1 file changed, 91 insertions(+), 91 deletions(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 4f86fd45108..f059d465ad4 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -120,7 +120,7 @@ jobs: id: vrt-no-flag with: token: ${{ secrets.GITHUB_TOKEN }} - environment: vrt-no-flag--${{ github.event.number }} + environment: vrt-no-flag-${{ github.event.number }} environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' - name: Update vrt-no-flag deployment status (success) if: success() @@ -138,95 +138,95 @@ jobs: state: 'failure' deployment-id: ${{ steps.vrt-no-flag.outputs.deployment_id }} - # deploy-vrt-all-flags: - # name: VRT (All flags enabled) - # if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} - # needs: [vrt-reports, deploy-preview] - # permissions: - # deployments: write - # runs-on: ubuntu-latest - # steps: - # - uses: chrnorm/deployment-action@v2.0.7 - # name: Create GitHub deployment for vrt-all-flags - # id: vrt-all-flags - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # environment: vrt-all-flags-${{ github.event.number }} - # environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags' - # - name: Update vrt-all-flags deployment status (success) - # if: success() - # uses: chrnorm/deployment-status@v2.0.3 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags' - # state: 'success' - # deployment-id: ${{ steps.vrt-all-flags.outputs.deployment_id }} - # - name: Update vrt-all-flags deployment status (failure) - # if: failure() - # uses: chrnorm/deployment-status@v2.0.3 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # state: 'failure' - # deployment-id: ${{ steps.vrt-all-flags.outputs.deployment_id }} + deploy-vrt-all-flags: + name: VRT (All flags enabled) + if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} + needs: deploy-preview + permissions: + deployments: write + runs-on: ubuntu-latest + steps: + - uses: chrnorm/deployment-action@v2.0.7 + name: Create GitHub deployment for vrt-all-flags + id: vrt-all-flags + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: vrt-all-flags-${{ github.event.number }} + environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags' + - name: Update vrt-all-flags deployment status (success) + if: success() + uses: chrnorm/deployment-status@v2.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags' + state: 'success' + deployment-id: ${{ steps.vrt-all-flags.outputs.deployment_id }} + - name: Update vrt-all-flags deployment status (failure) + if: failure() + uses: chrnorm/deployment-status@v2.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + state: 'failure' + deployment-id: ${{ steps.vrt-all-flags.outputs.deployment_id }} - # deploy-aat-no-flag: - # name: AAT (No flags enabled) - # if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} - # needs: [aat-reports, deploy-preview] - # permissions: - # deployments: write - # runs-on: ubuntu-latest - # steps: - # - uses: chrnorm/deployment-action@v2.0.7 - # name: Create GitHub deployment for aat-no-flag - # id: aat-no-flag - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # environment: aat-no-flag-${{ github.event.number }} - # environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag' - # - name: Update aat-no-flag deployment status (success) - # if: success() - # uses: chrnorm/deployment-status@v2.0.3 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag' - # state: 'success' - # deployment-id: ${{ steps.aat-no-flag.outputs.deployment_id }} - # - name: Update aat-no-flag deployment status (failure) - # if: failure() - # uses: chrnorm/deployment-status@v2.0.3 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # state: 'failure' - # deployment-id: ${{ steps.aat-no-flag.outputs.deployment_id }} + deploy-aat-no-flag: + name: AAT (No flags enabled) + if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} + needs: deploy-preview + permissions: + deployments: write + runs-on: ubuntu-latest + steps: + - uses: chrnorm/deployment-action@v2.0.7 + name: Create GitHub deployment for aat-no-flag + id: aat-no-flag + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: aat-no-flag-${{ github.event.number }} + environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag' + - name: Update aat-no-flag deployment status (success) + if: success() + uses: chrnorm/deployment-status@v2.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag' + state: 'success' + deployment-id: ${{ steps.aat-no-flag.outputs.deployment_id }} + - name: Update aat-no-flag deployment status (failure) + if: failure() + uses: chrnorm/deployment-status@v2.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + state: 'failure' + deployment-id: ${{ steps.aat-no-flag.outputs.deployment_id }} - # deploy-aat-all-flags: - # name: AAT (All flags enabled) - # if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} - # needs: [aat-reports, deploy-preview] - # permissions: - # deployments: write - # runs-on: ubuntu-latest - # steps: - # - uses: chrnorm/deployment-action@v2.0.7 - # name: Create GitHub deployment for aat-all-flags - # id: aat-all-flags - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # environment: aat-all-flags-${{ github.event.number }} - # environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags' - # - name: Update aat-all-flags deployment status (success) - # if: success() - # uses: chrnorm/deployment-status@v2.0.3 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags' - # state: 'success' - # deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }} - # - name: Update aat-all-flags deployment status (failure) - # if: failure() - # uses: chrnorm/deployment-status@v2.0.3 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # state: 'failure' - # deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }} + deploy-aat-all-flags: + name: AAT (All flags enabled) + if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} + needs: deploy-preview + permissions: + deployments: write + runs-on: ubuntu-latest + steps: + - uses: chrnorm/deployment-action@v2.0.7 + name: Create GitHub deployment for aat-all-flags + id: aat-all-flags + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: aat-all-flags-${{ github.event.number }} + environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags' + - name: Update aat-all-flags deployment status (success) + if: success() + uses: chrnorm/deployment-status@v2.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags' + state: 'success' + deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }} + - name: Update aat-all-flags deployment status (failure) + if: failure() + uses: chrnorm/deployment-status@v2.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + state: 'failure' + deployment-id: ${{ steps.aat-all-flags.outputs.deployment_id }} From 5057377fc61c249e8c6c18234eaa615e7585d05a Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Thu, 9 Jan 2025 14:02:09 -0500 Subject: [PATCH 40/48] Failed vrt --- packages/react/src/Button/ButtonBase.module.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/src/Button/ButtonBase.module.css b/packages/react/src/Button/ButtonBase.module.css index 3df7e8c1e48..b3fe47d307b 100644 --- a/packages/react/src/Button/ButtonBase.module.css +++ b/packages/react/src/Button/ButtonBase.module.css @@ -15,8 +15,8 @@ user-select: none; background-color: transparent; border: var(--borderWidth-thin) solid; - border-color: var(--button-default-borderColor-rest); - border-radius: var(--borderRadius-medium); + border-color: var(--button-danger-borderColor-active); + border-radius: var(--borderRadius-large); transition: 80ms cubic-bezier(0.65, 0, 0.35, 1); transition-property: color, fill, background-color, border-color; appearance: none; From f0c567979596dfbca9e65db8d1b847f5e2cb2279 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Thu, 9 Jan 2025 14:02:38 -0500 Subject: [PATCH 41/48] revert failed vrt --- packages/react/src/Button/ButtonBase.module.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/src/Button/ButtonBase.module.css b/packages/react/src/Button/ButtonBase.module.css index b3fe47d307b..3df7e8c1e48 100644 --- a/packages/react/src/Button/ButtonBase.module.css +++ b/packages/react/src/Button/ButtonBase.module.css @@ -15,8 +15,8 @@ user-select: none; background-color: transparent; border: var(--borderWidth-thin) solid; - border-color: var(--button-danger-borderColor-active); - border-radius: var(--borderRadius-large); + border-color: var(--button-default-borderColor-rest); + border-radius: var(--borderRadius-medium); transition: 80ms cubic-bezier(0.65, 0, 0.35, 1); transition-property: color, fill, background-color, border-color; appearance: none; From e624f269dc1e34d88b4b3821411b26d11c5788ae Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Thu, 9 Jan 2025 14:29:54 -0500 Subject: [PATCH 42/48] update fork --- .github/workflows/deploy_preview_forks.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy_preview_forks.yml b/.github/workflows/deploy_preview_forks.yml index 4b8ca45d6cf..1e538f8d7d0 100644 --- a/.github/workflows/deploy_preview_forks.yml +++ b/.github/workflows/deploy_preview_forks.yml @@ -28,12 +28,6 @@ jobs: name: github-pages path: docs/public - vrt-reports: - uses: ./.github/workflows/vrt-reports.yml - - aat-reports: - uses: ./.github/workflows/aat-reports.yml - deploy-preview: if: ${{ github.repository != github.event.pull_request.head.repo.full_name }} needs: build @@ -52,3 +46,11 @@ jobs: uses: actions/deploy-pages@v4 with: preview: true + + vrt-reports: + if: ${{ github.repository != github.event.pull_request.head.repo.full_name }} + uses: ./.github/workflows/vrt-reports.yml + + aat-reports: + if: ${{ github.repository != github.event.pull_request.head.repo.full_name }} + uses: ./.github/workflows/aat-reports.yml From 880a3d2eb5bcedc73bd53557a86224b40889a6bc Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Fri, 10 Jan 2025 12:13:56 -0500 Subject: [PATCH 43/48] try workflow_run --- .github/workflows/aat-reports.yml | 173 ------------ .github/workflows/ci.yml | 300 +++++++++++++++++++++ .github/workflows/deploy_preview.yml | 38 ++- .github/workflows/deploy_preview_forks.yml | 10 +- .github/workflows/vrt-reports.yml | 173 ------------ 5 files changed, 317 insertions(+), 377 deletions(-) delete mode 100644 .github/workflows/aat-reports.yml delete mode 100644 .github/workflows/vrt-reports.yml diff --git a/.github/workflows/aat-reports.yml b/.github/workflows/aat-reports.yml deleted file mode 100644 index 1b5194137fb..00000000000 --- a/.github/workflows/aat-reports.yml +++ /dev/null @@ -1,173 +0,0 @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f78646e2520..efafa072637 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,6 +100,306 @@ jobs: - name: Build run: npm run build -ws --if-present + vrt-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 VRT + 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 @vrt --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: vrt-no-flag-${{ matrix.shard }} + path: blob-report + retention-days: 1 + + vrt: + if: ${{ always() }} + runs-on: ubuntu-latest + needs: vrt-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: vrt-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: vrt-no-flag + path: playwright-report + - name: check vrt-runner job status + if: ${{ needs.vrt-runner.result == 'failure' }} + continue-on-error: true + run: exit 1 + + vrt-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 VRT + 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 @vrt --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: vrt-all-flags-${{ matrix.shard }} + path: blob-report + retention-days: 1 + + vrt-all-flags: + if: ${{ always() }} + runs-on: ubuntu-latest + needs: vrt-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: vrt-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: vrt-all-flags + path: playwright-report + - name: check vrt-runner-all-flags job status + if: ${{ needs.vrt-runner-all-flags.result == 'failure' }} + continue-on-error: true + run: exit 1 + + 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 + build-components-json: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index f059d465ad4..5d326c83266 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -1,23 +1,17 @@ name: Deploy Preview on: - pull_request: + workflow_run: + workflows: [CI] + types: + - completed concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - vrt-reports: - if: ${{ github.event.pull_request.head.repo.full_name == 'primer/react' }} - uses: ./.github/workflows/vrt-reports.yml - - aat-reports: - if: ${{ github.event.pull_request.head.repo.full_name == 'primer/react' }} - uses: ./.github/workflows/aat-reports.yml - build: - if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} - needs: [vrt-reports, aat-reports] + if: ${{ always() && github.event.workflow_run.event.pull_request.head.repo.full_name == 'primer/react' }} runs-on: ubuntu-latest steps: @@ -58,7 +52,7 @@ jobs: path: docs/public deploy-preview: - if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} + if: ${{ always() && github.event.workflow_run.event.pull_request.head.repo.full_name == 'primer/react' }} needs: build permissions: pages: write @@ -78,7 +72,7 @@ jobs: deploy-storybook: name: Preview Storybook - if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} + if: ${{ always() && github.event.workflow_run.event.pull_request.head.repo.full_name == 'primer/react' }} needs: deploy-preview permissions: deployments: write @@ -89,7 +83,7 @@ jobs: id: storybook with: token: ${{ secrets.GITHUB_TOKEN }} - environment: storybook-preview-${{ github.event.number }} + environment: storybook-preview-${{ github.event.workflow_run.event.number }} environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}storybook' - name: Update storybook deployment status (success) if: success() @@ -109,7 +103,7 @@ jobs: deploy-vrt-no-flag: name: VRT (No flags enabled) - if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} + if: ${{ always() && github.event.workflow_run.event.pull_request.head.repo.full_name == 'primer/react' }} needs: [deploy-preview] permissions: deployments: write @@ -120,7 +114,7 @@ jobs: id: vrt-no-flag with: token: ${{ secrets.GITHUB_TOKEN }} - environment: vrt-no-flag-${{ github.event.number }} + environment: vrt-no-flag-${{ github.event.workflow_run.event.number }} environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-no-flag' - name: Update vrt-no-flag deployment status (success) if: success() @@ -140,7 +134,7 @@ jobs: deploy-vrt-all-flags: name: VRT (All flags enabled) - if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} + if: ${{ always() && github.event.workflow_run.event.pull_request.head.repo.full_name == 'primer/react' }} needs: deploy-preview permissions: deployments: write @@ -151,7 +145,7 @@ jobs: id: vrt-all-flags with: token: ${{ secrets.GITHUB_TOKEN }} - environment: vrt-all-flags-${{ github.event.number }} + environment: vrt-all-flags-${{ github.event.workflow_run.event.number }} environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}vrt-all-flags' - name: Update vrt-all-flags deployment status (success) if: success() @@ -171,7 +165,7 @@ jobs: deploy-aat-no-flag: name: AAT (No flags enabled) - if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} + if: ${{ always() && github.event.workflow_run.event.pull_request.head.repo.full_name == 'primer/react' }} needs: deploy-preview permissions: deployments: write @@ -182,7 +176,7 @@ jobs: id: aat-no-flag with: token: ${{ secrets.GITHUB_TOKEN }} - environment: aat-no-flag-${{ github.event.number }} + environment: aat-no-flag-${{ github.event.workflow_run.event.number }} environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-no-flag' - name: Update aat-no-flag deployment status (success) if: success() @@ -202,7 +196,7 @@ jobs: deploy-aat-all-flags: name: AAT (All flags enabled) - if: ${{ always() && github.event.pull_request.head.repo.full_name == 'primer/react' }} + if: ${{ always() && github.event.workflow_run.event.pull_request.head.repo.full_name == 'primer/react' }} needs: deploy-preview permissions: deployments: write @@ -213,7 +207,7 @@ jobs: id: aat-all-flags with: token: ${{ secrets.GITHUB_TOKEN }} - environment: aat-all-flags-${{ github.event.number }} + environment: aat-all-flags-${{ github.event.workflow_run.event.number }} environment-url: '${{ needs.deploy-preview.outputs.deployment_url }}aat-all-flags' - name: Update aat-all-flags deployment status (success) if: success() diff --git a/.github/workflows/deploy_preview_forks.yml b/.github/workflows/deploy_preview_forks.yml index 1e538f8d7d0..dca93d6f19e 100644 --- a/.github/workflows/deploy_preview_forks.yml +++ b/.github/workflows/deploy_preview_forks.yml @@ -45,12 +45,4 @@ jobs: id: deployment uses: actions/deploy-pages@v4 with: - preview: true - - vrt-reports: - if: ${{ github.repository != github.event.pull_request.head.repo.full_name }} - uses: ./.github/workflows/vrt-reports.yml - - aat-reports: - if: ${{ github.repository != github.event.pull_request.head.repo.full_name }} - uses: ./.github/workflows/aat-reports.yml + preview: true \ No newline at end of file diff --git a/.github/workflows/vrt-reports.yml b/.github/workflows/vrt-reports.yml deleted file mode 100644 index f411a33b488..00000000000 --- a/.github/workflows/vrt-reports.yml +++ /dev/null @@ -1,173 +0,0 @@ -name: VRT Reports -on: - push: - branches: - - main - - next-major - workflow_call: - outputs: - aat-all-flags: - value: ${{ jobs.vrt-all-flags.result }} - aat-no-flag: - value: ${{ jobs.vrt.result }} - merge_group: - branches: - - main - - next-major - types: - - checks_requested - -concurrency: - group: vrt-${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - vrt-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 VRT - 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 @vrt --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: vrt-no-flag-${{ matrix.shard }} - path: blob-report - retention-days: 1 - - vrt: - if: ${{ always() }} - runs-on: ubuntu-latest - needs: vrt-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: vrt-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: vrt-no-flag - path: playwright-report - - name: check vrt-runner job status - if: ${{ needs.vrt-runner.result == 'failure' }} - continue-on-error: true - run: exit 1 - - vrt-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 VRT - 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 @vrt --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: vrt-all-flags-${{ matrix.shard }} - path: blob-report - retention-days: 1 - - vrt-all-flags: - if: ${{ always() }} - runs-on: ubuntu-latest - needs: vrt-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: vrt-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: vrt-all-flags - path: playwright-report - - name: check vrt-runner-all-flags job status - if: ${{ needs.vrt-runner-all-flags.result == 'failure' }} - continue-on-error: true - run: exit 1 From 59d0e30455ca77f7e4b3b8136a54e83eb29b6ce6 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Fri, 10 Jan 2025 12:16:18 -0500 Subject: [PATCH 44/48] format fix --- .github/workflows/deploy_preview_forks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_preview_forks.yml b/.github/workflows/deploy_preview_forks.yml index dca93d6f19e..98a033ec12b 100644 --- a/.github/workflows/deploy_preview_forks.yml +++ b/.github/workflows/deploy_preview_forks.yml @@ -45,4 +45,4 @@ jobs: id: deployment uses: actions/deploy-pages@v4 with: - preview: true \ No newline at end of file + preview: true From 97ae03e8162453ebbba6bd9073470c49e40bf169 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Fri, 10 Jan 2025 12:29:29 -0500 Subject: [PATCH 45/48] trigger workflow --- .github/workflows/deploy_preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 5d326c83266..8aa30b595b6 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -1,7 +1,7 @@ name: Deploy Preview on: workflow_run: - workflows: [CI] + workflows: ["CI"] types: - completed From 58fc37af9b486803f838d160cbb4aee2a10ade08 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Fri, 10 Jan 2025 12:38:01 -0500 Subject: [PATCH 46/48] fix format --- .github/workflows/deploy_preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 8aa30b595b6..588d0b37919 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -1,7 +1,7 @@ name: Deploy Preview on: workflow_run: - workflows: ["CI"] + workflows: ['CI'] types: - completed From 69cd17d47bbac612ce156b713f89dfc836272cb3 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Fri, 10 Jan 2025 12:41:14 -0500 Subject: [PATCH 47/48] add branch --- .github/workflows/deploy_preview.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 588d0b37919..b6c869b59de 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -1,6 +1,8 @@ name: Deploy Preview on: workflow_run: + branches: + - main workflows: ['CI'] types: - completed From cc826c1712a4712c0fc99b43d82429f153fd8ed1 Mon Sep 17 00:00:00 2001 From: Hussam Ghazzi Date: Fri, 10 Jan 2025 12:42:42 -0500 Subject: [PATCH 48/48] remove quotes --- .github/workflows/deploy_preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index b6c869b59de..d38e5c74946 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -3,7 +3,7 @@ on: workflow_run: branches: - main - workflows: ['CI'] + workflows: [CI] types: - completed