Skip to content

ci: add ci script

ci: add ci script #3

name: Continuous Integration
on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize]
jobs:
common:
name: Common
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["18.x", "20.x", "22.x"]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Lint
run: pnpm lint
- name: Test
run: pnpm test
playwright:
name: Playwright tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["18.x", "20.x", "22.x"]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm install
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
working-directory: ./examples/playwright
run: npx playwright test