Skip to content

Commit 187cdcf

Browse files
bors[bot]adamgreig
andauthored
Merge #298
298: Try scheduling CI runs r=thalesfragoso a=adamgreig This is a first go at running CI jobs on a scheduled basis. This job will run at 7pm UTC today (Wednesday), run our tests, and, in this case, fail. On failure it should then open a new issue on the repository with a link to the failed CI job. We can bikeshed the schedule (this is just to get it to run soonish), and obviously I'll do another PR to remove the failing step once we've checked it works. Please don't merge if we miss 7pm weds; I'll update the schedule first. Co-authored-by: Adam Greig <[email protected]>
2 parents 5910cbe + cf49826 commit 187cdcf

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/cron.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
on:
2+
schedule:
3+
# Run every week at 7pm UTC Wednesday.
4+
- cron: '0 19 * * WED'
5+
6+
name: Cron CI
7+
8+
jobs:
9+
ci-linux:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions-rs/toolchain@v1
14+
with:
15+
profile: minimal
16+
toolchain: stable
17+
override: true
18+
- name: Run tests
19+
run: cargo test --all
20+
- name: Deliberate failure to test issue opening
21+
run: false
22+
- uses: imjohnbo/issue-bot@v2
23+
if: failure()
24+
with:
25+
title: CI Failure
26+
body: |
27+
Scheduled CI run failed. Details:
28+
29+
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)