Skip to content

Commit 8e9c399

Browse files
committed
Try reusable workflow
1 parent b4fb3ff commit 8e9c399

File tree

2 files changed

+7
-69
lines changed

2 files changed

+7
-69
lines changed

Diff for: .github/workflows/test-js.yml

+4-68
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,8 @@
1-
name: Run JS tests
1+
name: Run tests
22
on:
33
- push
44
- pull_request
55
jobs:
6-
bun:
7-
name: Bun
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
11-
with:
12-
submodules: true
13-
- uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1
14-
- run: bun install
15-
- run: bun run build
16-
- run: bun test/index.js
17-
deno:
18-
name: Deno
19-
runs-on: ubuntu-latest
20-
steps:
21-
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
22-
with:
23-
submodules: true
24-
- uses: denoland/setup-deno@909cc5acb0fdd60627fb858598759246509fa755 # v2.0.2
25-
- run: deno install
26-
- run: deno task build
27-
- run: deno --allow-env --allow-read --allow-write test/index.js
28-
lint:
29-
name: Lint
30-
runs-on: ubuntu-latest
31-
steps:
32-
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
33-
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
34-
with:
35-
registry-url: 'https://registry.npmjs.org'
36-
cache: npm
37-
- run: npm install
38-
- run: npm run build --if-present
39-
- run: npm run lint --if-present
40-
node:
41-
name: Node v${{ matrix.node }}
42-
runs-on: ubuntu-latest
43-
strategy:
44-
matrix:
45-
node: [18, 20, 22]
46-
steps:
47-
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
48-
with:
49-
submodules: true
50-
- name: Use Node.js ${{ matrix.node }}
51-
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
52-
with:
53-
node-version: ${{ matrix.node }}
54-
registry-url: 'https://registry.npmjs.org'
55-
cache: npm
56-
- run: npm install
57-
- run: npm run build --if-present
58-
- run: npm test
59-
coverage:
60-
name: Measure coverage on Node
61-
runs-on: ubuntu-latest
62-
steps:
63-
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
64-
with:
65-
submodules: true
66-
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
67-
with:
68-
registry-url: 'https://registry.npmjs.org'
69-
cache: npm
70-
- run: npm install
71-
- run: npm run build --if-present
72-
- run: npm run test:coverage --if-present
6+
test-js:
7+
name: 'JS v0.2.2' # v0.2.2 == commit below
8+
uses: paulmillr/jsbt/.github/workflows/test-js.yml@986dbfea9667eeb0e81bf606cbe9ed169fea89b2

Diff for: package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@
4343
"build": "tsc && tsc -p tsconfig.esm.json",
4444
"lint": "prettier --check src",
4545
"format": "prettier --write src",
46-
"test": "node test/index.js"
46+
"test": "node test/index.js",
47+
"test:bun": "bun test/index.js",
48+
"test:deno": "deno test/index.js"
4749
},
4850
"exports": {
4951
".": {

0 commit comments

Comments
 (0)