|
1 | 1 | 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: |
3 | 7 | jobs: |
4 | 8 | execution-checks: |
5 | 9 | 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 |
6 | 12 | container: |
7 | 13 | image: docker://us-docker.pkg.dev/colab-images/public/runtime:latest |
8 | 14 | options: --gpus all |
9 | 15 | steps: |
10 | 16 | - uses: actions/checkout@v5 |
11 | | - with: |
12 | | - ref: ${{ github.event.pull_request.head.sha }} |
13 | 17 | # Install build software |
14 | 18 | - name: Install Build Software & LaTeX |
15 | 19 | shell: bash -l {0} |
|
46 | 50 | with: |
47 | 51 | name: execution-reports |
48 | 52 | 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 |
49 | 93 | - name: Preview Deploy to Netlify |
50 | 94 | uses: nwtgck/actions-netlify@v3 |
51 | 95 | with: |
|
0 commit comments