Skip to content

Commit 39be460

Browse files
committed
chore: set up CI
1 parent 39edc3e commit 39be460

File tree

6 files changed

+255
-267
lines changed

6 files changed

+255
-267
lines changed

.github/workflows/ci-lazer-js.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "Lazer JS Test Suite"
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
8+
jobs:
9+
lazer-js-test-suite:
10+
name: Lazer JS Test Suite
11+
runs-on: ubuntu-22.04
12+
defaults:
13+
run:
14+
working-directory: lazer/js
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 18
20+
- run: npm install --global pnpm@9.2.0
21+
- run: pnpm install --frozen-lockfile
22+
- run: pnpm run test

lazer/js/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
tsconfig.tsbuildinfo
2+
dist

lazer/js/package-lock.json

Lines changed: 0 additions & 264 deletions
This file was deleted.

lazer/js/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
"type": "module",
77
"scripts": {
88
"start": "node --loader ts-node/esm src/index.js",
9-
"test": "echo \"Error: no test specified\" && exit 1"
9+
"test": "pnpm run test:format && pnpm run build:cjs && pnpm run build:esm",
10+
"build:cjs": "tsc --project tsconfig.json --verbatimModuleSyntax false --module commonjs --outDir ./dist/cjs && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json",
11+
"build:esm": "tsc --project tsconfig.json --outDir ./dist/esm && echo '{\"type\":\"module\"}' > dist/esm/package.json",
12+
"fix:format": "prettier --write **/*.*",
13+
"test:format": "prettier --check **/*.*"
1014
},
1115
"author": "",
1216
"license": "Apache-2.0",
@@ -15,6 +19,7 @@
1519
},
1620
"devDependencies": {
1721
"@cprussin/tsconfig": "^3.0.1",
22+
"prettier": "^3.4.1",
1823
"ts-node": "^10.9.2",
1924
"typescript": "^5.7.2"
2025
}

0 commit comments

Comments
 (0)