1- # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2- # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
41name : Build & Test
52
63on :
1310
1411jobs :
1512 build :
16-
1713 runs-on : ubuntu-latest
1814
1915 strategy :
2016 matrix :
21- node-version : [20.x, 22.x]
22- # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
17+ node-version : [20.x, 22.x, 24.x]
2318
2419 steps :
2520 - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -28,39 +23,28 @@ jobs:
2823 with :
2924 node-version : ${{ matrix.node-version }}
3025
31- - run : |
32- cd Common/msal-node-wrapper
33- npm ci
34- npm audit --omit=dev
35- npm run build --if-present
36- npm run test
37-
38- - run : |
39- cd 1-Authentication/1-sign-in/App
40- npm install
41- npm audit --omit=dev
42- npm run test
43-
44- - run : |
45- cd 1-Authentication/2-sign-in-b2c/App
46- npm install
47- npm audit --omit=dev
48- npm run test
49-
50- - run : |
51- cd 2-Authorization/1-call-graph/App
52- npm install
53- npm audit --omit=dev
54- npm run test
55-
56- - run : |
57- cd 4-AccessControl/1-app-roles/App
58- npm install
59- npm audit --omit=dev
60- npm run test
61-
62- - run : |
63- cd 4-AccessControl/2-security-groups/App
64- npm install
65- npm audit --omit=dev
66- npm run test
26+ - name : Install, audit, build, and test
27+ shell : bash
28+ run : |
29+ set -euo pipefail
30+
31+ projects=(
32+ "Common/msal-node-wrapper"
33+ "1-Authentication/1-sign-in/App"
34+ "1-Authentication/2-sign-in-b2c/App"
35+ "2-Authorization/1-call-graph/App"
36+ "3-Deployment/App"
37+ "4-AccessControl/1-app-roles/App"
38+ "4-AccessControl/2-security-groups/App"
39+ "5-AdvancedScenarios/1-call-graph-bff/App"
40+ "5-AdvancedScenarios/1-call-graph-bff/App/client"
41+ )
42+
43+ for project in "${projects[@]}"; do
44+ echo "::group::$project"
45+ npm ci --prefix "$project"
46+ npm audit --prefix "$project" --omit=dev
47+ npm run build --prefix "$project" --if-present
48+ npm test --prefix "$project" --if-present
49+ echo "::endgroup::"
50+ done
0 commit comments