Merge pull request #5 from chenweiyi/master #47
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: | |
- master | |
pull_request: | |
branches: | |
- master | |
merge_group: {} | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Set node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: pnpm | |
- name: Install | |
run: pnpm i | |
- name: Lint | |
run: pnpm run lint | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node_version: [16, 18] | |
include: | |
- os: macos-latest | |
node_version: 18 | |
- os: windows-latest | |
node_version: 18 | |
fail-fast: false | |
steps: | |
- name: Set git to use LF | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- uses: actions/checkout@v3 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Set node ${{ matrix.node_version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node_version }} | |
cache: pnpm | |
- run: corepack enable | |
- name: Install | |
run: pnpm i | |
- name: Build | |
run: pnpm run build | |
- name: Test | |
run: pnpm run test | |
- name: Typecheck | |
run: pnpm run typecheck |