Skip to content

Commit c5c7fda

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

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/js.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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:
27+
version:
28+
- 18.x
29+
- 20.x
30+
- lts
31+
- latest
32+
projects:
33+
- folder: component-model/examples/tutorial/jco
34+
steps:
35+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36+
37+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
38+
39+
- name: Cache npm install
40+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
41+
with:
42+
key: node-modules-${{ matrix.node.version }}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('${{ matrix.projects.folder }}/package-lock.json') }}
43+
path: |
44+
${{ matrix.projects.folder }}
45+
46+
- name: Install NodeJS dependencies
47+
working-directory: ${{ matrix.projects.folder }}
48+
run: |
49+
npm install
50+
51+
- name: Install NodeJS dependencies
52+
working-directory: ${{ matrix.projects.folder }}
53+
run: |
54+
npm test

0 commit comments

Comments
 (0)