@@ -13,7 +13,8 @@ permissions:
1313 pull-requests : write
1414
1515jobs :
16- build :
16+ # Ubuntu build with MongoDB matrix (9 combinations: 3 Node × 3 MongoDB)
17+ build-ubuntu :
1718 runs-on : ubuntu-latest
1819
1920 strategy :
3839 node-version : ${{ matrix.node-version }}
3940
4041 - name : Start MongoDB
41- uses : supercharge/mongodb-github-action@315db7fe45ac2880b7758f1933e6e5d59afd5e94 # ratchet:supercharge/mongodb-github-action@ 1.12.1
42+ uses : supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
4243 with :
4344 mongodb-version : ${{ matrix.mongodb-version }}
4445
@@ -65,24 +66,21 @@ jobs:
6566 with :
6667 files : ./coverage/lcov.info
6768 token : ${{ secrets.CODECOV_TOKEN }}
68- # - name: Exit if coverage condition not met
69- # if: ${{ steps.test.outputs.exit_code }} != 0
70- # run: exit ${{ steps.test.outputs.exit_code }}
7169
7270 - name : Build frontend
7371 run : npm run build-ui
7472
7573 - name : Save build folder
76- uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # ratchet:actions/upload-artifact@ v4
74+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
7775 with :
78- name : build-${{ matrix.node-version }}-mongo-${{ matrix.mongodb-version }}
76+ name : build-ubuntu-node- ${{ matrix.node-version }}-mongo-${{ matrix.mongodb-version }}
7977 if-no-files-found : error
8078 path : build
8179
8280 - name : Download the build folders
83- uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # ratchet:actions/download-artifact@ v5
81+ uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
8482 with :
85- name : build-${{ matrix.node-version }}-mongo-${{ matrix.mongodb-version }}
83+ name : build-ubuntu-node- ${{ matrix.node-version }}-mongo-${{ matrix.mongodb-version }}
8684 path : build
8785
8886 - name : Run cypress test
@@ -93,37 +91,80 @@ jobs:
9391 wait-on-timeout : 120
9492 command : npm run cypress:run
9593
94+ # Windows build - single combination for development support
95+ build-windows :
96+ runs-on : windows-latest
97+
98+ steps :
99+ - name : Harden Runner
100+ uses : step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
101+ with :
102+ egress-policy : audit
103+
104+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
105+ with :
106+ fetch-depth : 0
107+
108+ - name : Use Node.js 24.x
109+ uses : actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
110+ with :
111+ node-version : 24.x
112+
113+ - name : Enable Windows Developer Mode
114+ shell : powershell
115+ run : |
116+ reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
117+
118+ - name : Install dependencies
119+ run : npm ci
120+
121+ - name : Check Types (Server)
122+ run : npm run check-types:server
123+
124+ - name : Build TypeScript
125+ run : npm run build-ts
126+
127+ - name : Test
128+ id : test
129+ shell : bash
130+ run : |
131+ npm run test-coverage-ci
132+ npm run test-coverage-ci --workspaces --if-present
133+
134+ - name : Build frontend
135+ run : npm run build-ui
136+
96137 # Execute a final job to collect the results and report a single check status
97138 results :
98139 if : ${{ always() }}
99140 runs-on : ubuntu-latest
100141 name : build result
101- needs : [build]
142+ needs : [build-ubuntu, build-windows ]
102143 steps :
103144 - name : Check build results
104145 run : |
105- result="${{ needs.build.result }}"
106- if [[ $result == "success" || $result == "skipped" ]]; then
146+ ubuntu_result="${{ needs.build-ubuntu.result }}"
147+ windows_result="${{ needs.build-windows.result }}"
148+ if [[ ($ubuntu_result == "success" || $ubuntu_result == "skipped") && ($windows_result == "success" || $windows_result == "skipped") ]]; then
107149 echo "### ✅ All builds passed" >> $GITHUB_STEP_SUMMARY
108150 exit 0
109151 else
110152 echo "### ❌ Some builds failed" >> $GITHUB_STEP_SUMMARY
153+ echo "- Ubuntu: $ubuntu_result" >> $GITHUB_STEP_SUMMARY
154+ echo "- Windows: $windows_result" >> $GITHUB_STEP_SUMMARY
111155 exit 1
112156 fi
113157
114158 - name : Parse failed matrix jobs
115- if : needs.build.result == 'failure'
159+ if : needs.build-ubuntu.result == 'failure' || needs.build-windows .result == 'failure'
116160 run : |
117161 echo "## Failed Matrix Combinations" >> $GITHUB_STEP_SUMMARY
118162 echo "" >> $GITHUB_STEP_SUMMARY
119- echo "| Node Version | MongoDB Version | Status |" >> $GITHUB_STEP_SUMMARY
120- echo "|--------------|-----------------|--------|" >> $GITHUB_STEP_SUMMARY
121-
122- # Parse the matrix results from the build job
123- results='${{ toJSON(needs.build.outputs) }}'
163+ echo "| OS | Node Version | MongoDB Version | Status |" >> $GITHUB_STEP_SUMMARY
164+ echo "|----|--------------|-----------------|--------|" >> $GITHUB_STEP_SUMMARY
124165
125166 # Since we can't directly get individual matrix job statuses,
126167 # we'll note that the build job failed
127- echo "| Multiple | Multiple | ❌ Failed |" >> $GITHUB_STEP_SUMMARY
168+ echo "| Multiple | Multiple | Multiple | ❌ Failed |" >> $GITHUB_STEP_SUMMARY
128169 echo "" >> $GITHUB_STEP_SUMMARY
129170 echo "⚠️ Check the [build job logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details on which specific matrix combinations failed." >> $GITHUB_STEP_SUMMARY
0 commit comments