Skip to content

Commit 816297e

Browse files
committed
chore: setup test
1 parent c7827c1 commit 816297e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3154
-69
lines changed

β€Ž.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
dist
3+
*.snap

β€Ž.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"extends": "@antfu/eslint-config",
3+
"env": {
4+
"jest": true
5+
},
36
"rules": {
47
"@typescript-eslint/no-unused-vars": "off"
58
}

β€Ž.github/workflows/test.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
9+
pull_request:
10+
branches:
11+
- main
12+
- master
13+
14+
jobs:
15+
build:
16+
runs-on: ${{ matrix.os }}
17+
18+
strategy:
19+
matrix:
20+
node-version: [12.x, 14.x]
21+
os: [ubuntu-latest, windows-latest, macos-latest]
22+
fail-fast: false
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- name: Use Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v1
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
32+
- name: Setup
33+
run: npm i -g pnpm @antfu/ni
34+
35+
- name: Install
36+
run: nci
37+
38+
- name: Lint
39+
run: nr lint --if-present
40+
41+
- name: Test
42+
run: nr test --if-present

β€Ž.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignore-workspace-root-check=true

β€Ž.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib"
3+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
Β (0)