Skip to content

Commit ceb67b3

Browse files
sis0k0claude
andcommitted
Add weekly scheduled CI run and CODEOWNERS
Runs the existing test suite weekly (Mondays 06:10 UTC) in addition to push/PR, and adds a CODEOWNERS file with the learning-fuel team as owner. On CI failure, files/updates a GitHub issue mentioning the team. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent f068f1a commit ceb67b3

2 files changed

Lines changed: 44 additions & 0 deletions

File tree

‎.github/CODEOWNERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @mongodb-developer/learning-fuel

‎.github/workflows/ci.yml‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
pull_request:
66
workflow_dispatch:
7+
schedule:
8+
- cron: '10 6 * * 1'
79

810
jobs:
911
smoke:
@@ -120,3 +122,44 @@ jobs:
120122
env:
121123
MONGODB_URI: mongodb://admin:mongodb@localhost:27017/
122124
run: pytest tests/test_integration.py -v
125+
126+
notify-on-failure:
127+
needs: smoke
128+
if: failure()
129+
runs-on: ubuntu-latest
130+
permissions:
131+
issues: write
132+
steps:
133+
- name: File or update CI failure issue for @mongodb-developer/learning-fuel
134+
uses: actions/github-script@v7
135+
with:
136+
script: |
137+
const title = `CI failure on ${context.ref}`;
138+
const body = [
139+
'@mongodb-developer/learning-fuel the CI workflow failed.',
140+
'',
141+
`Workflow: ${context.workflow}`,
142+
`Run: ${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
143+
].join('\n');
144+
const { data: existing } = await github.rest.issues.listForRepo({
145+
owner: context.repo.owner,
146+
repo: context.repo.repo,
147+
state: 'open',
148+
labels: 'ci-failure',
149+
});
150+
if (existing.length > 0) {
151+
await github.rest.issues.createComment({
152+
owner: context.repo.owner,
153+
repo: context.repo.repo,
154+
issue_number: existing[0].number,
155+
body,
156+
});
157+
} else {
158+
await github.rest.issues.create({
159+
owner: context.repo.owner,
160+
repo: context.repo.repo,
161+
title,
162+
body,
163+
labels: ['ci-failure'],
164+
});
165+
}

0 commit comments

Comments
 (0)