Skip to content

Commit 3b1b555

Browse files
committed
test: add a result job to ci
1 parent 9b6eeb2 commit 3b1b555

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ jobs:
4444
- name: Install dependencies
4545
run: npm ci
4646

47+
- name: Simulate failure for testing (REMOVE ME)
48+
if: matrix.node-version == '22.x' && matrix.mongodb-version == '7.0'
49+
run: |
50+
echo "Simulating failure for Node 22.x + MongoDB 7.0"
51+
exit 1
52+
4753
# for now only check the types of the server
4854
# tsconfig isn't quite set up right to respect what vite accepts
4955
# for the frontend code
@@ -91,3 +97,18 @@ jobs:
9197
wait-on: 'http://localhost:3000'
9298
wait-on-timeout: 120
9399
command: npm run cypress:run
100+
101+
# Execute a final job to collect the results and report a single check status
102+
results:
103+
if: ${{ always() }}
104+
runs-on: ubuntu-latest
105+
name: CI result
106+
needs: [build]
107+
steps:
108+
- run: |
109+
result="${{ needs.build.result }}"
110+
if [[ $result == "success" || $result == "skipped" ]]; then
111+
exit 0
112+
else
113+
exit 1
114+
fi

0 commit comments

Comments
 (0)