Skip to content

Commit 4afeecb

Browse files
wip: check_required
1 parent de69b5e commit 4afeecb

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,23 @@ jobs:
9191
if: matrix.node-version == '10.x' || matrix.node-version == '12.x'
9292

9393
- run: npm test
94+
95+
check_required:
96+
needs: [lint, test, test_node]
97+
runs-on: ubuntu-24.04
98+
if: always() # Run even if lint-each-os fails
99+
name: Ensure all checks pass
100+
steps:
101+
- run: |
102+
node -e "
103+
const needs = JSON.parse(process.env.NEEDS_JSON);
104+
105+
if (Object.values(needs).some(job => job.result !== 'success')) {
106+
console.error('Required checks failed. You need to fix the problem before merging.');
107+
process.exit(1);
108+
} else {
109+
console.log('All checks passed.');
110+
}
111+
"
112+
env:
113+
NEEDS_JSON: ${{ toJSON(needs) }}

0 commit comments

Comments
 (0)