Skip to content

Commit 531ed9c

Browse files
committed
test node 16
1 parent aad295e commit 531ed9c

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Node.js Build
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build_backend:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '22'
19+
check-latest: true
20+
21+
- name: Install dependencies
22+
run: |
23+
cd nodejs-backend
24+
npm install
25+
npm rebuild
26+
- name: Run build
27+
run: |
28+
cd nodejs-backend
29+
exit_status=0
30+
timeout 60 npm run backend || exit_status=$?
31+
32+
if [[ $exit_status -eq 124 ]]; then
33+
echo "Backend ran good!"
34+
else
35+
echo "Backend run failed!"
36+
exit 1
37+
fi
38+
39+
# - name: Run tests
40+
# run: npm test

.github/workflows/build.yaml renamed to .github/workflows/buildFrontend.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Node.js
1616
uses: actions/setup-node@v4
1717
with:
18-
node-version: 'current'
18+
node-version: '16'
1919
check-latest: true
2020

2121
- name: Install dependencies

0 commit comments

Comments
 (0)