Skip to content

Commit 03c7768

Browse files
committed
ci
1 parent 5bc0730 commit 03c7768

File tree

3 files changed

+49
-3
lines changed

3 files changed

+49
-3
lines changed

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20'
20+
21+
- name: Install pnpm
22+
uses: pnpm/action-setup@v2
23+
with:
24+
version: 8
25+
26+
- name: Get pnpm store directory
27+
shell: bash
28+
run: |
29+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
30+
31+
- name: Setup pnpm cache
32+
uses: actions/cache@v4
33+
with:
34+
path: ${{ env.STORE_PATH }}
35+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
36+
restore-keys: |
37+
${{ runner.os }}-pnpm-store-
38+
39+
- name: Install dependencies
40+
run: pnpm install
41+
42+
- name: Lint
43+
run: pnpm run lint
44+
45+
- name: Test
46+
run: pnpm run test

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"typescript": "^5.0.0",
1212
"vitest": "^1.0.0",
1313
"@eslint/js": "latest",
14-
"@typescript-eslint/eslint-plugin": "latest",
15-
"@typescript-eslint/parser": "latest",
14+
"@typescript-eslint/eslint-plugin": "^7.0.0",
15+
"@typescript-eslint/parser": "^7.0.0",
1616
"eslint": "^9.0.0",
1717
"eslint-config-prettier": "^9.0.0"
1818
}

packages/d2ts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"scripts": {
1818
"build": "tsc",
19-
"test": "vitest",
19+
"test": "vitest run",
2020
"lint": "eslint './src/**/*.ts' './tests/**/*.ts' --config eslint.config.mjs",
2121
"lint:fix": "eslint src/**/*.ts tests/**/*.ts --fix",
2222
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json}\" \"tests/**/*.{ts,tsx,js,jsx,json}\"",

0 commit comments

Comments
 (0)