forked from CS3219-AY2425S1/cs3219-ay2425s1-project-g03
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (45 loc) · 1.29 KB
/
tests.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
## https://docs.github.com/en/actions
name: CI
# Controls when the workflow will run
on:
push:
branches: [ 'main' ]
pull_request:
branches: [ 'main' ]
types: [ 'opened', 'reopened', 'synchronize']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
node-version: '20.x'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-frontend:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
- name: Install Node Modules
run: cd frontend && npm ci
- name: Linting
run: cd frontend && npm run lint
- name: Build App
run: cd frontend && npm run build
build-question:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
- name: Install Node Modules
run: cd services/question && npm ci
- name: Linting
run: cd frontend && npm run lint
- name: Build App
run: cd services/question && npm run build