Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: 'Setup Environment'
description: 'Common setup steps for Node and dependencies'

outputs:
node-version:
description: 'Selected Node version'
value: ${{ steps.which_node.outputs.version }}

runs:
using: 'composite'
steps:
- name: Select Node Version
id: which_node
shell: pwsh
run: |
# Determine branch (handles push vs PR)
$branch = "${{ github.event_name == 'pull_request' && github.base_ref || github.ref_name }}"

# Select node version based on branch
switch ($branch) {
"v93" { $node = "20.x" }
"v100" { $node = "22.x" }
# Future changes:
# "v102" { $node = "24.x" }
default { $node = "22.x" }
}

# Output clear info for logs
Write-Host "🔹 Branch detected: $branch"
Write-Host "🔹 Node version selected: $node"

# Pass to subsequent steps
echo "version=$node" >> $env:GITHUB_OUTPUT

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: ${{ steps.which_node.outputs.version }}
cache: npm
cache-dependency-path: ./imxweb/package-lock.json

- name: Install packages
shell: bash
working-directory: ./imxweb
run: npm install --skip-dialog
79 changes: 38 additions & 41 deletions .github/workflows/npm-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Build Angular workspace
name: One Identity Frontend CI Build
description: CI workflow to build, package and test One Identity frontend applications

on:
push:
Expand All @@ -7,50 +8,46 @@ on:
branches: [ v100, v93 ]

jobs:
build:
runs-on: windows-latest

ci:
name: Build, package, and test applications
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Select Node version
id: node
shell: pwsh
run: |
# Determine branch (handles push vs PR)
$branch = "${{ github.event_name == 'pull_request' && github.base_ref || github.ref_name }}"

# Select node version based on branch
switch ($branch) {
"v93" { $node = "20.x" }
"v100" { $node = "22.x" }
# Future changes:
# "v110" { $node = "24.x" }
default { $node = "22.x" }
}

# Output clear info for logs
Write-Host "🔹 Branch detected: $branch"
Write-Host "🔹 Node version selected: $node"

# Pass to subsequent steps
echo "version=$node" >> $env:GITHUB_OUTPUT

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: ${{ steps.node.outputs.version }}

- name: Install packages
working-directory: ./imxweb
run: npm install --skip-dialog
- 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: npm run nx:build-all
timeout-minutes: 25
run: npx nx run-many -t build -c production

- 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@v6
with:
name: imxweb-apps
path: ./imxweb/dist/Html_*.zip

- name: Test All
working-directory: ./imxweb
run: npm run nx:test-ci
timeout-minutes: 40
# Tests currently do not work
# - name: Test All
# working-directory: ./imxweb
# run: npm run nx:test-ci
# timeout-minutes: 30

Binary file removed imxweb/imx-modules/elemental-ui-core-20.0.76.tgz
Binary file not shown.
Binary file added imxweb/imx-modules/elemental-ui-core-20.0.79.tgz
Binary file not shown.
Loading