Skip to content

Commit 3ab8cdd

Browse files
committed
run js tests on CI
1 parent d31962b commit 3ab8cdd

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/nodejs.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Node.js Span Bridge CI
2+
3+
on:
4+
push:
5+
branches: ["main", "release-*"]
6+
pull_request:
7+
branches: ["main", "release-*"]
8+
paths:
9+
- "pkg/internal/nodejs/**"
10+
- ".github/workflows/nodejs.yml"
11+
workflow_dispatch:
12+
workflow_call:
13+
inputs:
14+
ref:
15+
description: "Git ref (commit, branch, or tag) to check out"
16+
required: false
17+
type: string
18+
19+
concurrency:
20+
group: nodejs-${{ github.head_ref || github.run_id }}
21+
cancel-in-progress: true
22+
23+
permissions:
24+
contents: read
25+
26+
jobs:
27+
test:
28+
name: Test span bridge (Node ${{ matrix.node }})
29+
runs-on: ubuntu-latest
30+
timeout-minutes: 10
31+
strategy:
32+
matrix:
33+
node: [18, 20, 22]
34+
fail-fast: false
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
38+
with:
39+
ref: ${{ inputs.ref || github.sha }}
40+
persist-credentials: false
41+
42+
- name: Set up Node.js ${{ matrix.node }}
43+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
44+
with:
45+
node-version: ${{ matrix.node }}
46+
cache: npm
47+
cache-dependency-path: pkg/internal/nodejs/spanbridge_test/package-lock.json
48+
49+
- name: Run Node.js span-bridge tests
50+
run: make test-nodejs

0 commit comments

Comments
 (0)