Skip to content

Commit 1df6199

Browse files
committed
ci: check formatting and types
1 parent 743838c commit 1df6199

File tree

5 files changed

+38
-0
lines changed

5 files changed

+38
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,38 @@ on:
55
pull_request:
66

77
jobs:
8+
"typecheck":
9+
name: "Typecheck"
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 2
12+
steps:
13+
- name: "Checkout this repo"
14+
uses: actions/checkout@v4
15+
- name: "Setup Node.js"
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: "18.x"
19+
- name: "Install node dependencies and build"
20+
run: "npm ci && npm run build"
21+
- name: "Typecheck"
22+
run: "npm run typecheck"
23+
24+
"format-check":
25+
name: "Check formatting"
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 2
28+
steps:
29+
- name: "Checkout this repo"
30+
uses: actions/checkout@v4
31+
- name: "Setup Node.js"
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: "18.x"
35+
- name: "Install node dependencies"
36+
run: "npm ci"
37+
- name: "Check formatting"
38+
run: "npm run format:check"
39+
840
"test-against-sqld":
941
name: "Tests against sqld"
1042
runs-on: ubuntu-latest

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
"lint-staged": "^15.2.2"
1010
},
1111
"scripts": {
12+
"build": "npm run build --workspaces",
13+
"typecheck": "npm run typecheck --workspaces",
14+
"format:check": "npm run format:check --workspaces",
1215
"prepare": "node .husky/install.mjs",
1316
"lint-staged": "lint-staged"
1417
}

packages/libsql-client-wasm/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"build": "npm run build:esm",
5252
"build:esm": "tsc -p tsconfig.build-esm.json",
5353
"bundle": "rm -rf node_modules && mkdir -p node_modules/@libsql/libsql-wasm-experimental && cp -R ../../node_modules/@libsql/libsql-wasm-experimental/* node_modules/@libsql/libsql-wasm-experimental",
54+
"format:check": "prettier --check .",
5455
"test": "jest --runInBand",
5556
"typecheck": "tsc --noEmit",
5657
"typedoc": "rm -rf ./docs && typedoc"

packages/libsql-client/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
"build": "npm run build:cjs && npm run build:esm",
9595
"build:cjs": "tsc -p tsconfig.build-cjs.json",
9696
"build:esm": "tsc -p tsconfig.build-esm.json",
97+
"format:check": "prettier --check .",
9798
"postbuild": "cp package-cjs.json ./lib-cjs/package.json",
9899
"test": "jest --runInBand",
99100
"typecheck": "tsc --noEmit",

packages/libsql-core/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
"build": "npm run build:cjs && npm run build:esm",
7171
"build:cjs": "tsc -p tsconfig.build-cjs.json",
7272
"build:esm": "tsc -p tsconfig.build-esm.json",
73+
"format:check": "prettier --check .",
7374
"postbuild": "cp package-cjs.json ./lib-cjs/package.json",
7475
"test": "jest --runInBand",
7576
"typecheck": "tsc --noEmit",

0 commit comments

Comments
 (0)