Skip to content

Commit 41072ce

Browse files
authored
ci: Create node.js.yml
1 parent 08f9f3d commit 41072ce

1 file changed

Lines changed: 92 additions & 0 deletions

File tree

.github/workflows/node.js.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Full Stack CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
test-api-linux:
11+
name: API Test (Linux)
12+
runs-on: ubuntu-latest
13+
defaults:
14+
run:
15+
working-directory: api
16+
17+
strategy:
18+
matrix:
19+
node-version: [18.x, 20.x, 22.x]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Set up Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
cache: 'npm'
28+
- run: npm ci
29+
- run: npm test
30+
31+
test-frontend-linux:
32+
name: Frontend Test (Linux)
33+
runs-on: ubuntu-latest
34+
defaults:
35+
run:
36+
working-directory: frontend
37+
38+
strategy:
39+
matrix:
40+
node-version: [18.x, 20.x, 22.x]
41+
42+
steps:
43+
- uses: actions/checkout@v4
44+
- name: Set up Node.js ${{ matrix.node-version }}
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version: ${{ matrix.node-version }}
48+
cache: 'npm'
49+
- run: npm ci
50+
- run: npm test
51+
52+
test-api-windows:
53+
name: API Test (Windows)
54+
runs-on: windows-latest
55+
defaults:
56+
run:
57+
working-directory: api
58+
59+
strategy:
60+
matrix:
61+
node-version: [18.x, 20.x, 22.x]
62+
63+
steps:
64+
- uses: actions/checkout@v4
65+
- name: Set up Node.js ${{ matrix.node-version }}
66+
uses: actions/setup-node@v4
67+
with:
68+
node-version: ${{ matrix.node-version }}
69+
cache: 'npm'
70+
- run: npm ci
71+
- run: npm test
72+
73+
test-frontend-windows:
74+
name: Frontend Test (Windows)
75+
runs-on: windows-latest
76+
defaults:
77+
run:
78+
working-directory: frontend
79+
80+
strategy:
81+
matrix:
82+
node-version: [18.x, 20.x, 22.x]
83+
84+
steps:
85+
- uses: actions/checkout@v4
86+
- name: Set up Node.js ${{ matrix.node-version }}
87+
uses: actions/setup-node@v4
88+
with:
89+
node-version: ${{ matrix.node-version }}
90+
cache: 'npm'
91+
- run: npm ci
92+
- run: npm test

0 commit comments

Comments
 (0)