This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 23
49 lines (45 loc) · 1.47 KB
/
policy-npm.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
# This workflow will build and test a node.js application for PR verification
#
# For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions
# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples
name: client - build & test
on:
pull_request:
branches:
- main
env:
NODE_VERSION: "16.x" # set this to the node version to use
jobs:
build-and-test-angular:
name: Angular - Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: npm install, build, and test
run: |
# Build and test the project
cd client
npm install
npm run build --if-present
# npm run test --if-present
build-and-test-vue:
name: Vue - Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: npm install, build, and test
run: |
# Build and test the project
cd vue-client
npm install
npm run build --if-present
# npm run test:unit --if-present
# npm run test:e2e:ci --if-present