generated from CS3219-AY2324S1/course-assessment-template
-
Notifications
You must be signed in to change notification settings - Fork 5
36 lines (29 loc) · 1.02 KB
/
user_profile_backend.js.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
# 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
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: user_profile_backend CI
on:
push:
branches: ['master']
pull_request:
branches: ['master']
defaults:
run:
working-directory: backend/user_profile_backend
jobs:
user_profile_backend_test_and_coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout Backend
uses: actions/checkout@v3
# - run: npm ci
# - run: npm run build --if-present
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Install Dependencies
run: npm install mocha chai sinon --save-dev
npm install --save-dev nyc
working-directory: backend/user_profile_backend
- name: Run Tests with Coverage
run: npm run test-with-coverage