Skip to content

Commit fbb7718

Browse files
committed
Create GitHub action ci.yml
1 parent 2363213 commit fbb7718

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ['*']
6+
pull_request:
7+
branches: ['*']
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [22.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
cache: 'npm'
24+
- run: npm ci
25+
- run: npm run typecheck
26+
- run: npm run prettier:check
27+
- run: npm run lint:check
28+
- run: npm test

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
"build": "cross-env NODE_ENV=production tsup src/index.ts --dts --minify --treeshake --format cjs,esm,iife --global-name fluentvalidation --sourcemap",
3535
"test": "jest",
3636
"lint": "eslint --fix",
37+
"lint:check": "eslint",
3738
"prettier": "prettier --write \"{src,test}/**/*.ts\"",
39+
"prettier:check": "prettier --check \"{src,test}/**/*.ts\"",
3840
"typecheck": "tsc --noEmit && tsc --noEmit --project tsconfig.test.json",
3941
"prepare": "husky"
4042
},

0 commit comments

Comments
 (0)