Skip to content

Update clerk (major) #7479

Update clerk (major)

Update clerk (major) #7479

Workflow file for this run

name: main
on:
push:
branches: [main, next]
pull_request:
jobs:
install:
name: Install node modules
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Cache npm
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: Cache node_modules
uses: actions/cache@v4
id: cache-node-modules
with:
path: |
node_modules
packages/*/node_modules
key: modules-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci --no-audit
lint:
name: Lint
needs: install
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Cache node_modules
uses: actions/cache/restore@v4
id: cache-node-modules
with:
path: |
node_modules
packages/*/node_modules
key: modules-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci --no-audit
- name: Lint
run: npm run lint
- name: Lint CSS
run: npm run lint-css
typescript:
name: Type check
needs: install
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Cache node_modules
uses: actions/cache/restore@v4
id: cache-node-modules
with:
path: |
node_modules
packages/*/node_modules
key: modules-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci --no-audit
- name: Type check
run: npm run tsc
build:
name: Build packages
needs: install
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Cache node_modules
uses: actions/cache/restore@v4
id: cache-node-modules
with:
path: |
node_modules
packages/*/node_modules
key: modules-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci --no-audit
- name: Build
run: npm run build
test:
name: Test (${{ matrix.shard }})
needs: install
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: ["1/2", "2/2"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Cache node_modules
uses: actions/cache/restore@v4
id: cache-node-modules
with:
path: |
node_modules
packages/*/node_modules
key: modules-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci --no-audit
- name: Test
run: npm test -- --shard ${{ matrix.shard }}
react17:
name: Test React 17 (${{ matrix.shard }})
needs: install
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: ["1/2", "2/2"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Cache node_modules
uses: actions/cache/restore@v4
id: cache-node-modules
with:
path: |
node_modules
packages/*/node_modules
key: modules-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci --no-audit
- name: Install React 17
run: npm run react17
- name: Test
run: npm test -- --shard ${{ matrix.shard }}
website:
name: Build website
needs: install
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Cache node_modules
uses: actions/cache/restore@v4
id: cache-node-modules
with:
path: |
node_modules
packages/*/node_modules
key: modules-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci --no-audit
- name: Cache Next.js
uses: actions/cache@v4
with:
path: website/.next
key: nextjs-${{ github.run_id }}
restore-keys: nextjs-
- name: Build website
run: npm run build-website-lite
test-chrome:
name: Test ${{ matrix.name }}
needs: website
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Chrome
engine: chromium
project: chrome
- name: Android
engine: chromium
project: android
- name: Firefox
engine: firefox
project: firefox
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Cache node_modules
uses: actions/cache/restore@v4
id: cache-node-modules
with:
path: |
node_modules
packages/*/node_modules
key: modules-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci --no-audit
- name: Cache playwright
id: cache-playwright
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ matrix.engine }}-${{ hashFiles('package-lock.json') }}
restore-keys: playwright-${{ matrix.engine }}-
- name: Install playwright
if: steps.cache-playwright.outputs.cache-hit != 'true'
run: npx playwright install --with-deps ${{ matrix.engine }}
- name: Restore website
uses: actions/cache/restore@v4
with:
path: website/.next
key: nextjs-${{ github.run_id }}
- name: Test
id: test
run: xvfb-run npm run playwright -- --project ${{ matrix.project }}
- name: Upload test results to GitHub
if: failure() && steps.test.outcome == 'failure'
uses: actions/upload-artifact@v3
with:
name: test-results
path: test-results
retention-days: 30
test-macos:
name: Test macOS
needs: website
runs-on: macos-latest
# concurrency:
# group: test-macos-${{ github.head_ref || github.run_id }}
# cancel-in-progress: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Cache node_modules
uses: actions/cache/restore@v4
id: cache-node-modules
with:
path: |
node_modules
packages/*/node_modules
key: modules-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci --no-audit
- name: Cache playwright
uses: actions/cache@v4
with:
path: ~/Library/Caches/ms-playwright
key: playwright-macos-${{ hashFiles('package-lock.json') }}
restore-keys: playwright-macos-
- name: Install playwright
run: npx playwright install --with-deps webkit
- name: Restore website
uses: actions/cache/restore@v4
with:
path: website/.next
key: nextjs-${{ github.run_id }}
- name: Test
id: test
run: npm run playwright -- --project safari --project ios
- name: Upload test results to GitHub
if: failure() && steps.test.outcome == 'failure'
uses: actions/upload-artifact@v3
with:
name: test-results
path: test-results
retention-days: 30