forked from zolcsi/map-of-pi
-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (37 loc) · 1.17 KB
/
map-of-pi.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
name: Map of Pi CI/CD
# Controls when the workflow will execute
on:
# Triggers the workflow on push or pull request events for the "main" and "dev" branch
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
# The sequence of tasks that will be executed as part of the job
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: 20
# Frontend CI/CD Process
- name: Install Dependencies for Frontend
run: cd frontend && npm install
- name: Build Frontend
run: cd frontend && npm run build -- --configuration=production
- name: Execute Tests for Frontend
run: cd frontend && npm run test -- --watch=false --browsers=ChromeHeadless
# Backend CI/CD Process
- name: Install Dependencies for Backend
run: cd backend && npm install
- name: Execute Tests for Backend
run: cd backend && npm run test