Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
24c5623
feat: first stab at visual comparison CI workflow
lennessyy Oct 1, 2025
5fb6ce4
add visual test files
lennessyy Oct 6, 2025
81f9b20
add visual comparison workflow
lennessyy Oct 7, 2025
9722673
docs: resolve merge conflicts
lennessyy Oct 7, 2025
e1f0005
Merge branch 'main' into visual-comparison
lennessyy Dec 17, 2025
9f67e65
fix visual comparison
lennessyy Dec 17, 2025
4554c17
longer timeout
lennessyy Dec 18, 2025
c977a94
fix: add explicit permissions to all workflow jobs
lennessyy Dec 19, 2025
2f1ed92
fix: prevent script injection in GitHub context usage
lennessyy Dec 19, 2025
e9cf550
Merge branch 'main' into visual-comparison
lennessyy Dec 19, 2025
a92b26d
fix: use visual-comparison label and remove branch ignores
lennessyy Dec 19, 2025
e34b988
fix: remove duplicate @playwright/test from dependencies
lennessyy Dec 22, 2025
d68ba12
fix: create gh-pages branch if it doesn't exist
lennessyy Dec 22, 2025
8e52aec
fix: improve gh-pages branch creation logic
lennessyy Dec 22, 2025
3bae3dd
fix: set git user before creating gh-pages branch
lennessyy Dec 22, 2025
2af1cf4
fix: explicitly specify remote and branch in git commands
lennessyy Dec 22, 2025
82f0c33
fix: handle race condition in gh-pages branch creation
lennessyy Dec 22, 2025
0f6912e
Replace GitHub Pages with Vercel for visual test reports
lennessyy Jan 2, 2026
dd5e841
Add bright red navbar for visual comparison testing
lennessyy Jan 2, 2026
7d2a317
Revert red navbar test changes
lennessyy Jan 2, 2026
d4a5533
docs: add to utilities.md
lennessyy Jan 5, 2026
049cf4b
Merge branch 'main' into visual-comparison
lennessyy Jan 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/cleanup-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Delete Visual Tests Reports

on:
delete:
branches-ignore: [master, main, gh-pages]

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

jobs:
delete_reports:
name: Delete Reports
runs-on: ubuntu-latest
permissions:
contents: write
env:
BRANCH_REPORTS_DIR: reports/${{ github.event.ref }}
steps:
- name: Checkout GitHub Pages Branch
uses: actions/checkout@v5
with:
ref: gh-pages

- name: Set Git User
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"

- name: Check for workflow reports
run: |
if [ -d "$BRANCH_REPORTS_DIR" ] && [ "$(ls -A $BRANCH_REPORTS_DIR)" ]; then
echo "BRANCH_REPORTS_EXIST=true" >> "$GITHUB_ENV"
else
echo "BRANCH_REPORTS_EXIST=false" >> "$GITHUB_ENV"
fi

- name: Delete reports from repo for branch
if: ${{ env.BRANCH_REPORTS_EXIST == 'true' }}
timeout-minutes: 3
env:
DELETED_BRANCH: ${{ github.event.ref }}
run: |
cd "$(dirname "$BRANCH_REPORTS_DIR")"
rm -rf "${DELETED_BRANCH}"
git add .
git commit -m "workflow: remove all reports for branch ${DELETED_BRANCH}"
while true; do
git pull --rebase
if [ $? -ne 0 ]; then
echo "Failed to rebase. Please review manually."
exit 1
fi
git push
if [ $? -eq 0 ]; then
echo "Successfully pushed HTML reports to repo."
exit 0
fi
done
131 changes: 131 additions & 0 deletions .github/workflows/screenshot-capture.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: Screenshot Capture

on:
schedule:
- cron: '0 0 * * 0' # Weekly on Sunday at midnight UTC
workflow_dispatch:

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PALETTE_API_KEY: ${{ secrets.PALETTE_API_KEY }}
FULLSTORY_ORGID: ${{ secrets.FULLSTORY_ORGID }}
ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }}
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_SEARCH_KEY: ${{ secrets.ALGOLIA_SEARCH_KEY }}
ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME }}
DISABLE_PACKS_INTEGRATIONS: ${{ secrets.DISABLE_PACKS_INTEGRATIONS }}
DISABLE_SECURITY_INTEGRATIONS: ${{ secrets.DISABLE_SECURITY_INTEGRATIONS }}
SHOW_LAST_UPDATE_TIME: ${{ secrets.SHOW_LAST_UPDATE_TIME }}
DSO_AUTH_TOKEN: ${{ secrets.DSO_AUTH_TOKEN }}
SEERS_CMP_KEY: ${{ secrets.SEERS_CMP_KEY }}

jobs:
create-assets:
name: asset-builds
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout Repository
uses: actions/checkout@v5

- name: Setup Node.js Environment
uses: actions/setup-node@v4
with:
node-version: "20"
cache: 'yarn'

- name: Install Dependencies
run: yarn install --frozen-lockfile

- name: Install Playwright browsers
run: npx playwright install --with-deps chromium

- name: Build Website
run: |
touch .env
yarn build

- name: Upload Build
uses: actions/upload-artifact@v4
with:
name: build
path: build/
if-no-files-found: error
retention-days: 1

visual-snapshots:
runs-on: ubuntu-latest
needs: [create-assets]
permissions:
contents: read
actions: read
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2, 3, 4]
shardTotal: [4]
steps:
- name: Checkout Repository
uses: actions/checkout@v5

- name: Setup Node.js Environment
uses: actions/setup-node@v4
with:
node-version: "20"
cache: 'yarn'

- name: Install Dependencies
uses: Wandalen/wretry.action@v3
with:
command: yarn install --frozen-lockfile
attempt_limit: 3
attempt_delay: 60000

- name: Install Playwright browsers
run: npx playwright install --with-deps chromium

- name: Download build artifact
uses: Wandalen/wretry.action@v3
with:
attempt_limit: 3
attempt_delay: 60000
action: actions/download-artifact@v5
with: |
name: build
path: build

- name: Take Screenshots with Playwright
env:
PLAYWRIGHT_SNAPSHOT_DIR: ${{ github.workspace }}/screenshots
run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --update-snapshots || exit 0

- name: Upload Screenshots
uses: actions/upload-artifact@v4
with:
name: screenshots-${{ matrix.shardIndex }}
path: screenshots/
if-no-files-found: error
retention-days: 3

merge-snapshots:
name: Merge Screenshots
runs-on: ubuntu-latest
needs: [visual-snapshots]
permissions:
actions: read
steps:
- name: Download screenshots
uses: actions/download-artifact@v5
with:
path: screenshots
pattern: screenshots-*
merge-multiple: true

- name: Upload merged screenshots
uses: actions/upload-artifact@v4
with:
name: screenshots
path: screenshots/
if-no-files-found: error
retention-days: 14
Loading