Skip to content

Commit 354da1f

Browse files
Copilotmmcky
andauthored
Adjust collab CI to run on weekly schedule instead of every PR (#601)
* Initial plan * Adjust collab.yml CI to run weekly and create issues on execution failure Co-authored-by: mmcky <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: mmcky <[email protected]>
1 parent c8f8a90 commit 354da1f

File tree

1 file changed

+47
-3
lines changed

1 file changed

+47
-3
lines changed

.github/workflows/collab.yml

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
name: Build Project on Google Collab (Execution)
2-
on: [pull_request]
2+
on:
3+
schedule:
4+
# Execute weekly on Monday at 4am UTC (offset from cache.yml)
5+
- cron: '0 4 * * 1'
6+
workflow_dispatch:
37
jobs:
48
execution-checks:
59
runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=ubuntu24-gpu-x64/disk=large"
10+
permissions:
11+
issues: write # required for creating issues on execution failure
612
container:
713
image: docker://us-docker.pkg.dev/colab-images/public/runtime:latest
814
options: --gpus all
915
steps:
1016
- uses: actions/checkout@v5
11-
with:
12-
ref: ${{ github.event.pull_request.head.sha }}
1317
# Install build software
1418
- name: Install Build Software & LaTeX
1519
shell: bash -l {0}
@@ -46,6 +50,46 @@ jobs:
4650
with:
4751
name: execution-reports
4852
path: _build/html/reports
53+
- name: Create execution failure report
54+
if: failure()
55+
run: |
56+
cat > execution-failure-report.md << 'EOF'
57+
# Colab Execution Failure Report
58+
59+
The weekly Google Colab execution check has failed. This indicates that one or more notebooks failed to execute properly in the Colab environment.
60+
61+
## Details
62+
63+
**Workflow Run:** [${{ github.run_id }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
64+
**Date:** ${{ github.event.head_commit.timestamp || github.event.schedule }}
65+
**Branch:** ${{ github.ref_name }}
66+
**Commit:** ${{ github.sha }}
67+
68+
## Execution Reports
69+
70+
Detailed execution reports have been uploaded as artifacts to this workflow run. Please check the following:
71+
72+
1. Download the `execution-reports` artifact from the workflow run
73+
2. Review the failed notebook execution logs
74+
3. Fix any execution issues in the notebooks
75+
4. Test locally or in Colab before merging
76+
77+
## Next Steps
78+
79+
1. Investigate the failure by reviewing the execution reports
80+
2. Fix the identified issues
81+
3. Test the fixes
82+
4. Close this issue once resolved
83+
84+
This is an automated issue created by the weekly Colab execution check.
85+
EOF
86+
- name: Create Issue on Execution Failure
87+
if: failure()
88+
uses: peter-evans/create-issue-from-file@v5
89+
with:
90+
title: "Weekly Colab Execution Check Failed - ${{ github.run_id }}"
91+
content-filepath: execution-failure-report.md
92+
labels: execution-failure, automated-issue, colab
4993
- name: Preview Deploy to Netlify
5094
uses: nwtgck/actions-netlify@v3
5195
with:

0 commit comments

Comments
 (0)