Skip to content

Commit

Permalink
chore: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
9romise committed Jul 15, 2024
1 parent 87449f6 commit b98dcb2
Show file tree
Hide file tree
Showing 5 changed files with 212 additions and 194 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

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

jobs:
test:
runs-on: ubuntu-latest

timeout-minutes: 10

strategy:
matrix:
node-version: [18.x, 'lts/*']
os: [ubuntu-latest, windows-latest]

fail-fast: false

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v4
- name: Use Node.js v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Test
run: npm run test
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"build": "tsup",
"prepare": "npx simple-git-hooks",
"lint": "eslint .",
"test": "vitest",
"typecheck": "tsc --noEmit",
"release": "bumpp"
},
Expand All @@ -55,7 +56,8 @@
"lint-staged": "^15.2.7",
"simple-git-hooks": "^2.11.1",
"tsup": "^8.1.0",
"typescript": "^5.5.3"
"typescript": "^5.5.3",
"vitest": "^2.0.2"
},
"simple-git-hooks": {
"pre-commit": "npx lint-staged"
Expand Down
Loading

0 comments on commit b98dcb2

Please sign in to comment.