Skip to content

Commit

Permalink
chore: add ci action
Browse files Browse the repository at this point in the history
  • Loading branch information
Lu-Jiejie committed May 16, 2024
1 parent dbb019a commit 803ad2a
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set node
uses: actions/setup-node@v4
with:
node-version: lts/*

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

- name: Install
run: nci

- name: Lint
run: nr lint

- name: Typecheck
run: nr typecheck

test:
runs-on: ubuntu-latest

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [lts/*]
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

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

- name: Install
run: nci

- name: Build
run: nr build

- name: Test
run: nr test

0 comments on commit 803ad2a

Please sign in to comment.