You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3
+
4
+
name: CI/CD for Server and Web
5
+
6
+
on:
7
+
push:
8
+
branches: [ "main" ]
9
+
pull_request:
10
+
branches: [ "main" ]
11
+
12
+
jobs:
13
+
server:
14
+
runs-on: ubuntu-latest
15
+
steps:
16
+
- uses: actions/checkout@v4
17
+
- name: Set up Node.js
18
+
uses: actions/setup-node@v4
19
+
with:
20
+
node-version: '18.x'
21
+
- name: Install dependencies for server
22
+
run: |
23
+
cd server
24
+
npm ci
25
+
- name: Run server tests
26
+
env:
27
+
OPEN_API_KEY: ${{ secrets.OPEN_API_KEY }}
28
+
run: |
29
+
cd server
30
+
npm test
31
+
web:
32
+
runs-on: ubuntu-latest
33
+
steps:
34
+
- uses: actions/checkout@v4
35
+
- name: Set up Node.js
36
+
uses: actions/setup-node@v4
37
+
with:
38
+
node-version: '18.x'
39
+
- name: Install dependencies for web
40
+
run: |
41
+
cd web
42
+
npm ci
43
+
- name: Build web app
44
+
run: |
45
+
cd web
46
+
npm run build
47
+
# build:
48
+
49
+
# runs-on: ubuntu-latest
50
+
51
+
# strategy:
52
+
# matrix:
53
+
# node-version: [18.x, 20.x, 22.x]
54
+
# # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
0 commit comments