Skip to content

chore: pack/build before all e2e tests (#2395) #2054

chore: pack/build before all e2e tests (#2395)

chore: pack/build before all e2e tests (#2395) #2054

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
build-18:
name: build (18)
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9.14.0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Lint
run: pnpm lint
- name: Build
run: pnpm build
- name: Cache build output
uses: actions/cache@v4
with:
path: ./lib
key: ${{ runner.os }}-node-18-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-18
build-20:
name: build (20)
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9.14.0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Lint
run: pnpm lint
- name: Build
run: pnpm build
- name: Cache build output
uses: actions/cache@v4
with:
path: ./lib
key: ${{ runner.os }}-node-20-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-20
test-unit-18:
name: test (unit) (18)
needs: build-18
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9.14.0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- name: Restore build cache
uses: actions/cache@v4
with:
path: ./lib
key: ${{ runner.os }}-node-18-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-node-18-build-
- name: Install dependencies
run: pnpm install
- name: Install Playwright browsers
run: pnpm exec playwright install
- name: Unit tests
run: pnpm test:unit
test-node-18:
name: test (node.js) (18)
needs: build-18
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9.14.0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- name: Restore build cache
uses: actions/cache@v4
with:
path: ./lib
key: ${{ runner.os }}-node-18-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-node-18-build-
- name: Install dependencies
run: pnpm install
- name: Node.js tests
run: pnpm test:node
test-node-20:
name: test (node.js) (20)
needs: build-20
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9.14.0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Restore build cache
uses: actions/cache@v4
with:
path: ./lib
key: ${{ runner.os }}-node-20-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-node-20-build-
- name: Install dependencies
run: pnpm install
- name: Node.js tests
run: pnpm test:node
test-e2e:
name: test (e2e) (18)
needs: build-18
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9.14.0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- name: Restore build cache
uses: actions/cache@v4
with:
path: ./lib
key: ${{ runner.os }}-node-20-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-node-20-build-
- name: Install dependencies
run: pnpm install
- name: E2E tests
run: pnpm test:e2e
test-browser:
name: test (browser)
needs: build-18
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9.14.0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- name: Restore build cache
uses: actions/cache@v4
with:
path: ./lib
key: ${{ runner.os }}-node-18-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-node-18-build-
- name: Install dependencies
run: pnpm install
- name: Playwright install
run: pnpm exec playwright install --with-deps chromium
- name: Browser tests
run: pnpm test:browser
- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: test/browser/test-results
test-native:
name: test (react-native)
needs: build-18
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9.14.0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- name: Restore build cache
uses: actions/cache@v4
with:
path: ./lib
key: ${{ runner.os }}-node-18-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-node-18-build-
- name: Install dependencies
run: pnpm install
- name: React Native tests
run: pnpm test:native