Skip to content

Commit a15ab38

Browse files
committed
Try reusable workflow
1 parent cc7b052 commit a15ab38

File tree

2 files changed

+6
-60
lines changed

2 files changed

+6
-60
lines changed

.github/workflows/test-js.yml

+4-60
Original file line numberDiff line numberDiff line change
@@ -1,64 +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-
- uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1
12-
- run: bun install
13-
- run: bun run build
14-
- run: bun test/index.js
15-
deno:
16-
name: Deno
17-
runs-on: ubuntu-latest
18-
steps:
19-
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
20-
- uses: denoland/setup-deno@909cc5acb0fdd60627fb858598759246509fa755 # v2.0.2
21-
- run: deno install
22-
- run: deno task build
23-
- run: deno --allow-env --allow-read --allow-write test/index.js
24-
lint:
25-
name: Lint
26-
runs-on: ubuntu-latest
27-
steps:
28-
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
29-
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
30-
with:
31-
registry-url: 'https://registry.npmjs.org'
32-
cache: npm
33-
- run: npm install
34-
- run: npm run build --if-present
35-
- run: npm run lint --if-present
36-
node:
37-
name: Node v${{ matrix.node }}
38-
runs-on: ubuntu-latest
39-
strategy:
40-
matrix:
41-
node: [14, 16, 18, 20, 22]
42-
steps:
43-
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
44-
- name: Use Node.js ${{ matrix.node }}
45-
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
46-
with:
47-
node-version: ${{ matrix.node }}
48-
registry-url: 'https://registry.npmjs.org'
49-
cache: npm
50-
- run: npm install
51-
- run: npm run build --if-present
52-
- run: npm test
53-
coverage:
54-
name: Measure coverage on Node
55-
runs-on: ubuntu-latest
56-
steps:
57-
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
58-
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
59-
with:
60-
registry-url: 'https://registry.npmjs.org'
61-
cache: npm
62-
- run: npm install
63-
- run: npm run build --if-present
64-
- 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

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
"lint": "prettier --check src",
4040
"format": "prettier --write src",
4141
"test": "node test/index.js",
42+
"test:bun": "bun test/index.js",
43+
"test:deno": "deno test/index.js",
4244
"test:slow": "node test/slow.test.js"
4345
},
4446
"author": "Paul Miller (https://paulmillr.com)",

0 commit comments

Comments
 (0)