Skip to content

Commit

Permalink
chore: update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-He95 committed Apr 22, 2024
1 parent 84a5a29 commit e99962c
Showing 1 changed file with 32 additions and 23 deletions.
55 changes: 32 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,58 +9,64 @@ on:
branches:
- main

merge_group: {}

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set node
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Setup
run: npm i -g @antfu/ni
- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Install
run: nci

- name: Lint
run: nr lint

typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.18.2
cache: pnpm

- name: Setup
run: npm i -g @antfu/ni

- name: Install
run: nci

- name: Typecheck
run: nr typecheck
- name: Lint
run: nr lint

test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
node: [14.x, 16.x]
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest]
node_version: [18.18.2, lts/*]
include:
- os: macos-latest
node_version: lts/*
- os: windows-latest
node_version: lts/*
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: Set node ${{ matrix.node }}

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node ${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
node-version: ${{ matrix.node_version }}
cache: pnpm

- run: corepack enable

- name: Setup
run: npm i -g @antfu/ni
Expand All @@ -73,3 +79,6 @@ jobs:

- name: Test
run: nr test

- name: Typecheck
run: nr typecheck

0 comments on commit e99962c

Please sign in to comment.