-
-
Notifications
You must be signed in to change notification settings - Fork 69
63 lines (52 loc) · 1.34 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Test and Build Merge Requests
on:
push:
paths-ignore:
- 'db/**'
pull_request:
paths-ignore:
- 'db/**'
jobs:
test-and-build:
runs-on: ubuntu-latest
# Define Node versions to run CI/CD on
strategy:
matrix:
node-version: [21.x]
steps:
# Checkout project
- name: Checkout repository
uses: actions/checkout@v4
# Setup Node
- name: Use Node.js ${{ matrix.node-version }} for frontend
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
# BACKEND #
# Install Packages
- name: Install Dependencies for Backend
working-directory: ./backend
run: npm ci
# Run Jest tests
- name: Run Tests
working-directory: ./backend
run: npm run test
# FRONTEND #
# Install Packages
- name: Install Dependencies for Frontend
working-directory: ./frontend
run: npm ci
# Run react-scripts tests
# Note: There are currently no tests
# - name: Install Dependencies
# working-directory: ./frontend
# run: npm run test
# SAMPLE-APP #
# Install Packages
- name: Install Dependencies for Sample App
working-directory: ./sample-app
run: npm ci
# Run Jest tests
- name: Run Build
working-directory: ./sample-app
run: npm run build