-
Notifications
You must be signed in to change notification settings - Fork 191
53 lines (43 loc) · 1.47 KB
/
npm-build.yml
File metadata and controls
53 lines (43 loc) · 1.47 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
51
52
53
name: One Identity Frontend CI Build
description: CI workflow to build, package and test One Identity frontend applications
on:
push:
branches: [ v100 ]
pull_request:
branches: [ v100, v93 ]
jobs:
ci:
name: Build, package, and test applications
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup # Setup steps
# Need to use nx cloud/ nx replay instead
# - name: Cache Nx
# uses: actions/cache@v5
# with:
# path: ./imxweb/.nx/cache
# key: nx-${{ runner.os }}-${{ hashFiles('imxweb/package-lock.json') }}
# restore-keys: |
# nx-${{ runner.os }}-
- name: Build All
working-directory: ./imxweb
run: npx nx run-many -t build -c production
- name: Test All
working-directory: ./imxweb
run: npm run nx:test-ci
timeout-minutes: 30
- name: Zip applications
run: |
# Dynamically get app names from projects dir
apps=$(ls -d ./imxweb/projects/*-app* 2>/dev/null | xargs -n1 basename)
for app in $apps; do
if [ -d "./imxweb/dist/$app" ]; then
( cd "./imxweb/dist/$app" && zip -r "../Html_${app}.zip" . )
fi
done
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: imxweb-apps
path: ./imxweb/dist/Html_*.zip