Skip to content

Commit

Permalink
Merge branch 'main' into name-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasoppermann authored Jul 13, 2023
2 parents 875187f + a511c8e commit 3102a9a
Show file tree
Hide file tree
Showing 741 changed files with 286 additions and 5 deletions.
55 changes: 54 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,57 @@ jobs:
run: npm run format:check

- name: Run unit tests
run: npm test
run: npm test

vrt-runner:
runs-on: ubuntu-latest-8-cores
strategy:
fail-fast: false
matrix:
shard: [1, 2]
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build v8 tokens
run: npm run build:next
- name: Build storybook
working-directory: docs/storybook
run: |
npm ci
npm run build-storybook
- name: Install browsers
run: npx playwright install --with-deps
- name: Run storybook
id: storybook
run: |
npx serve -l 6006 storybook-static &
pid=$!
echo "pid=$pid" >> $GITHUB_OUTPUT
sleep 5
working-directory: docs/storybook
- name: Run Visual Regression Tests
run: npx playwright test --shard="${{ matrix.shard }}/${{ strategy.job-total }}"
- name: Stop storybook
run: kill ${{ steps.storybook.outputs.pid }}
- name: Upload report
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: vrt-${{ matrix.shard }}
path: .playwright/report

vrt:
name: 'Visual Regression Testing'
if: ${{ always() }}
runs-on: ubuntu-latest
needs: vrt-runner
steps:
- name: Check vrt-runner job status
if: ${{ needs.vrt-runner.result == 'failure' }}
run: exit 1
56 changes: 56 additions & 0 deletions .github/workflows/update_visual_snapshots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Snapshots

on:
pull_request:
types: [labeled]

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

jobs:
update:
if: ${{ github.event.label.name == 'update snapshots' }}
name: 'Update snapshots'
runs-on:
labels: ubuntu-latest-16-cores
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Install dependencies
run: npm ci --no-audit --no-fund --ignore-scripts
- name: Install browsers
run: npx playwright install --with-deps
- name: Build v8 tokens
run: npm run build:next
- name: Build storybook
working-directory: docs/storybook
run: |
npm ci
npm run build-storybook
- name: Run storybook
id: storybook
run: |
npx serve -l 6006 storybook-static &
pid=$!
echo "pid=$pid" >> $GITHUB_OUTPUT
sleep 5
working-directory: docs/storybook
- name: Run Visual Regression Tests
run: npx playwright test --update-snapshots
- name: Stop storybook
run: kill ${{ steps.storybook.outputs.pid }}
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: github-actions[bot] Regenerated snapshots
- uses: actions-ecosystem/action-remove-labels@v1
with:
labels: 'update snapshots'
8 changes: 8 additions & 0 deletions .playwright/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
axe/
report/
results/
results.json

# Only include snapshots from Linux as these are used in CI
*.png
!*-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3102a9a

Please sign in to comment.