@@ -13,78 +13,164 @@ 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 :
21+ fail-fast : false
2022 matrix :
21- node-version : [20.x]
22- mongodb-version : [4.4 ]
23+ node-version : [20.x, 22.x, 24.x ]
24+ mongodb-version : ['6.0', '7.0', '8.0' ]
2325
2426 steps :
2527 - name : Harden Runner
26- uses : step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
28+ uses : step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
2729 with :
2830 egress-policy : audit
2931
30- - uses : actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
32+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3133 with :
3234 fetch-depth : 0
3335
3436 - name : Use Node.js ${{ matrix.node-version }}
35- uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
37+ uses : actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
3638 with :
3739 node-version : ${{ matrix.node-version }}
3840
3941 - name : Start MongoDB
40- uses : supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
42+ uses : supercharge/mongodb-github-action@315db7fe45ac2880b7758f1933e6e5d59afd5e94 # 1.12.1
4143 with :
4244 mongodb-version : ${{ matrix.mongodb-version }}
4345
4446 - name : Install dependencies
45- run : npm i
47+ run : npm ci
4648
4749 # for now only check the types of the server
4850 # tsconfig isn't quite set up right to respect what vite accepts
4951 # for the frontend code
5052 - name : Check Types (Server)
5153 run : npm run check-types:server
5254
55+ - name : Build TypeScript
56+ run : npm run build-ts
57+
5358 - name : Test
5459 id : test
5560 run : |
5661 npm run test-coverage-ci
5762 npm run test-coverage-ci --workspaces --if-present
5863
64+ - name : MongoDB Integration Tests
65+ env :
66+ RUN_MONGO_TESTS : ' true'
67+ GIT_PROXY_MONGO_CONNECTION_STRING : mongodb://localhost:27017/git-proxy-test
68+ run : npm run test:integration
69+
5970 - name : Upload test coverage report
60- uses : codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
71+ uses : codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
6172 with :
6273 files : ./coverage/lcov.info
6374 token : ${{ secrets.CODECOV_TOKEN }}
64- # - name: Exit if coverage condition not met
65- # if: ${{ steps.test.outputs.exit_code }} != 0
66- # run: exit ${{ steps.test.outputs.exit_code }}
6775
6876 - name : Build frontend
6977 run : npm run build-ui
7078
7179 - name : Save build folder
7280 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
7381 with :
74- name : build
82+ name : build-ubuntu-node-${{ matrix.node-version }}-mongo-${{ matrix.mongodb-version }}
7583 if-no-files-found : error
7684 path : build
7785
7886 - name : Download the build folders
79- uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
87+ uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
8088 with :
81- name : build
89+ name : build-ubuntu-node-${{ matrix.node-version }}-mongo-${{ matrix.mongodb-version }}
8290 path : build
8391
8492 - name : Run cypress test
85- uses : cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c # v6.10.2
93+ uses : cypress-io/github-action@f790eee7a50d9505912f50c2095510be7de06aa7 # v6.10.9
8694 with :
8795 start : npm start &
8896 wait-on : ' http://localhost:3000'
8997 wait-on-timeout : 120
90- run : npm run cypress:run
98+ command : npm run cypress:run
99+
100+ # Windows build - single combination for development support
101+ build-windows :
102+ runs-on : windows-latest
103+
104+ steps :
105+ - name : Harden Runner
106+ uses : step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
107+ with :
108+ egress-policy : audit
109+
110+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
111+ with :
112+ fetch-depth : 0
113+
114+ - name : Use Node.js 24.x
115+ uses : actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
116+ with :
117+ node-version : 24.x
118+
119+ - name : Enable Windows Developer Mode
120+ shell : powershell
121+ run : |
122+ reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
123+
124+ - name : Install dependencies
125+ run : npm ci
126+
127+ - name : Check Types (Server)
128+ run : npm run check-types:server
129+
130+ - name : Build TypeScript
131+ run : npm run build-ts
132+
133+ - name : Test
134+ id : test
135+ shell : bash
136+ run : |
137+ npm run test-coverage-ci
138+ npm run test-coverage-ci --workspaces --if-present
139+
140+ - name : Build frontend
141+ run : npm run build-ui
142+
143+ # Execute a final job to collect the results and report a single check status
144+ results :
145+ if : ${{ always() }}
146+ runs-on : ubuntu-latest
147+ name : build result
148+ needs : [build-ubuntu, build-windows]
149+ steps :
150+ - name : Check build results
151+ run : |
152+ ubuntu_result="${{ needs.build-ubuntu.result }}"
153+ windows_result="${{ needs.build-windows.result }}"
154+ if [[ ($ubuntu_result == "success" || $ubuntu_result == "skipped") && ($windows_result == "success" || $windows_result == "skipped") ]]; then
155+ echo "### ✅ All builds passed" >> $GITHUB_STEP_SUMMARY
156+ exit 0
157+ else
158+ echo "### ❌ Some builds failed" >> $GITHUB_STEP_SUMMARY
159+ echo "- Ubuntu: $ubuntu_result" >> $GITHUB_STEP_SUMMARY
160+ echo "- Windows: $windows_result" >> $GITHUB_STEP_SUMMARY
161+ exit 1
162+ fi
163+
164+ - name : Parse failed matrix jobs
165+ if : needs.build-ubuntu.result == 'failure' || needs.build-windows.result == 'failure'
166+ run : |
167+ echo "## Failed Matrix Combinations" >> $GITHUB_STEP_SUMMARY
168+ echo "" >> $GITHUB_STEP_SUMMARY
169+ echo "| OS | Node Version | MongoDB Version | Status |" >> $GITHUB_STEP_SUMMARY
170+ echo "|----|--------------|-----------------|--------|" >> $GITHUB_STEP_SUMMARY
171+
172+ # Since we can't directly get individual matrix job statuses,
173+ # we'll note that the build job failed
174+ echo "| Multiple | Multiple | Multiple | ❌ Failed |" >> $GITHUB_STEP_SUMMARY
175+ echo "" >> $GITHUB_STEP_SUMMARY
176+ 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