Skip to content

Commit 7082dd5

Browse files
authored
Enhance GitHub Actions workflows for nightly runs (#58)
- Added scheduled triggers for nightly execution of workflows in recursion, solidity-example, and web-starter Playwright. - Implemented issue creation on failure for nightly runs to notify developers of workflow failures. - Updated permissions to allow issue creation within the workflows.
1 parent 10a41bf commit 7082dd5

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed

.github/workflows/recursion.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@ on:
33
pull_request:
44
paths:
55
- "recursion/**"
6+
schedule:
7+
- cron: "0 2 * * *"
8+
workflow_dispatch:
69

710
jobs:
811
test:
912
defaults:
1013
run:
1114
working-directory: recursion
15+
permissions:
16+
issues: write
1217

1318
runs-on: ubuntu-latest
1419
steps:
@@ -42,3 +47,16 @@ jobs:
4247
run: |
4348
yarn generate-proof
4449
working-directory: recursion/js
50+
51+
- name: Create issue on failure (nightly)
52+
if: failure() && github.event_name == 'schedule'
53+
uses: actions/github-script@v6
54+
with:
55+
script: |
56+
github.issues.create({
57+
owner: context.repo.owner,
58+
repo: context.repo.repo,
59+
title: '[Nightly] Recursion workflow failed',
60+
body: `The nightly Recursion workflow failed. Please investigate.\n\n/cc @noir-lang/developerrelations`,
61+
labels: ['nightly', 'bug']
62+
})

.github/workflows/solidity-example.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@ on:
55
pull_request:
66
paths:
77
- "solidity-example/**"
8+
schedule:
9+
- cron: "0 2 * * *"
10+
workflow_dispatch:
811

912
jobs:
1013
test:
1114
defaults:
1215
run:
1316
working-directory: solidity-example
17+
permissions:
18+
issues: write
1419

1520
runs-on: ubuntu-latest
1621
steps:
@@ -56,3 +61,16 @@ jobs:
5661
bb prove -b ./target/noir_solidity.json -w target/noir_solidity.gz -o ./target --oracle_hash keccak
5762
cd ..
5863
(cd contract && forge test --optimize --optimizer-runs 5000 --gas-report -vvv)
64+
65+
- name: Create issue on failure (nightly)
66+
if: failure() && github.event_name == 'schedule'
67+
uses: actions/github-script@v6
68+
with:
69+
script: |
70+
github.issues.create({
71+
owner: context.repo.owner,
72+
repo: context.repo.repo,
73+
title: '[Nightly] Solidity-example workflow failed',
74+
body: `The nightly Solidity-example workflow failed. Please investigate.\n\n/cc @noir-lang/developerrelations`,
75+
labels: ['nightly', 'bug']
76+
})

.github/workflows/web-starter-playwright.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,16 @@ on:
33
pull_request:
44
paths:
55
- "web-starter/**"
6+
schedule:
7+
- cron: "0 2 * * *"
8+
workflow_dispatch:
69

710
jobs:
811
test:
912
runs-on: ubuntu-latest
13+
permissions:
14+
issues: write
15+
1016
steps:
1117
- uses: actions/checkout@v2
1218

@@ -62,3 +68,16 @@ jobs:
6268
working-directory: web-starter/web/webpack
6369
run: |
6470
yarn test:e2e
71+
72+
- name: Create issue on failure (nightly)
73+
if: failure() && github.event_name == 'schedule'
74+
uses: actions/github-script@v6
75+
with:
76+
script: |
77+
github.issues.create({
78+
owner: context.repo.owner,
79+
repo: context.repo.repo,
80+
title: '[Nightly] Web-starter Playwright workflow failed',
81+
body: `The nightly Web-starter Playwright workflow failed. Please investigate.\n\n/cc @noir-lang/developerrelations`,
82+
labels: ['nightly', 'bug']
83+
})

0 commit comments

Comments
 (0)