Skip to content

CI

CI #6768

Workflow file for this run

name: CI
on:
push:
branches:
- main
- next
pull_request:
branches:
- main
- next
merge_group: {}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Set node
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
- name: Setup
run: npm i -g @antfu/ni
- name: Install
run: nci
- name: Lint
run: nr lint
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [20.x, 22.x]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Set node version to ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: pnpm
- name: Setup
run: npm i -g @antfu/ni
- name: Install
run: nci
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Build
run: nr build
- name: Typecheck
run: nr typecheck
- name: unit tests
run: pnpm run test:unit
- name: browser tests
run: pnpm run test:browser
- if: matrix.node == '20.x'
name: attw tests
run: pnpm test:attw
- if: matrix.node == '22.x'
name: Playground Smoke Test
run: cd playgrounds && bash ./build.sh
release-pr:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: https://registry.npmjs.org/
cache: pnpm
- run: pnpm install
- run: pnpm run build
- run: pnpm run update:full
- run: pnpm dlx pkg-pr-new publish --compact --pnpm './packages/*'