release: [email protected] #1501
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: pnpm | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run lint | |
- run: pnpm run build | |
- run: pnpm run -C playground build | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node: [18.x, lts/*] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- name: Set node ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: pnpm | |
- run: pnpm install --frozen-lockfile | |
- name: Tests with coverage | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == 'lts/*' }} | |
run: pnpm run vitest --coverage | |
- name: Tests | |
if: ${{ matrix.os != 'ubuntu-latest' || matrix.node != 'lts/*' }} | |
run: pnpm run vitest | |
- name: Upload coverage to Codecov | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == 'lts/*' }} | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |