Merge pull request #35 from Zolyn/fix-move-type-not-found-warning-to-… #1
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: Unit Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
VITEST_SEGFAULT_RETRY: 3 | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup node 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: Setup ni | |
run: npm i -g @antfu/ni | |
- name: Install | |
run: nci | |
- name: Lint | |
run: nr lint | |
typecheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup node 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: Setup ni | |
run: npm i -g @antfu/ni | |
- name: Install | |
run: nci | |
- name: Type Check | |
run: nr typecheck | |
test: | |
strategy: | |
matrix: | |
version: [14.x, 16.x] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup node ${{ matrix.version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.version }} | |
- name: Setup ni | |
run: npm i -g @antfu/ni | |
- name: Install | |
run: nci | |
- name: Build | |
run: nr build | |
- name: Unit Test | |
run: nr test:ci |