-
Notifications
You must be signed in to change notification settings - Fork 35
50 lines (43 loc) · 1.33 KB
/
Copy pathbuild.yml
File metadata and controls
50 lines (43 loc) · 1.33 KB
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
name: Build & Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x, 24.x]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node-version }}
- name: Install, audit, build, and test
shell: bash
run: |
set -euo pipefail
projects=(
"Common/msal-node-wrapper"
"1-Authentication/1-sign-in/App"
"1-Authentication/2-sign-in-b2c/App"
"2-Authorization/1-call-graph/App"
"3-Deployment/App"
"4-AccessControl/1-app-roles/App"
"4-AccessControl/2-security-groups/App"
"5-AdvancedScenarios/1-call-graph-bff/App"
"5-AdvancedScenarios/1-call-graph-bff/App/client"
)
for project in "${projects[@]}"; do
echo "::group::$project"
npm ci --prefix "$project"
npm audit --prefix "$project" --omit=dev
npm run build --prefix "$project" --if-present
npm test --prefix "$project" --if-present
echo "::endgroup::"
done