Skip to content

Commit 2ce587e

Browse files
feat(ci): add js lang to CI
Signed-off-by: Victor Adossi <[email protected]>
1 parent 4e84845 commit 2ce587e

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/js.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: javascript
2+
3+
on:
4+
merge_group:
5+
push:
6+
branches:
7+
- main
8+
9+
pull_request:
10+
branches:
11+
- main
12+
13+
defaults:
14+
run:
15+
shell: bash
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
strategy:
25+
matrix:
26+
node-version:
27+
- 18.x
28+
- 20.x
29+
- lts
30+
- latest
31+
projects:
32+
- folder: component-model/examples/tutorial/jco
33+
steps:
34+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
35+
36+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
37+
with:
38+
node-version: ${{ matrix.node-version }}
39+
40+
- name: Cache npm install
41+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
42+
with:
43+
key: node-modules-${{ matrix.node-version }}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('${{ matrix.projects.folder }}/package-lock.json') }}
44+
path: |
45+
${{ matrix.projects.folder }}
46+
47+
- name: Install NodeJS dependencies
48+
working-directory: ${{ matrix.projects.folder }}
49+
run: |
50+
npm install
51+
52+
- name: Install NodeJS dependencies
53+
working-directory: ${{ matrix.projects.folder }}
54+
run: |
55+
npm test

0 commit comments

Comments
 (0)