Skip to content

Commit fbea2af

Browse files
committed
feat: overhaul CI into reusable workflow with nightly and PR triggers
1 parent 0f94321 commit fbea2af

3 files changed

Lines changed: 294 additions & 42 deletions

File tree

.github/workflows/ci_nightly.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
# Runs on a nightly schedule (and optionally via manual dispatch).
3+
#
4+
# Executes the full CI matrix: stability (latest tags) and frontier
5+
# (latest branches). Both runs file GitHub issues with their results
6+
# unless manually suppressed via workflow_dispatch inputs.
7+
8+
name: CI (Nightly)
9+
10+
on:
11+
# TODO: Remove this before you allow this PR to go into the main
12+
# pull_request trigger is just for testing
13+
pull_request:
14+
branches: ['main']
15+
schedule:
16+
# Nightly at 03:00 UTC
17+
- cron: '0 3 * * *'
18+
workflow_dispatch:
19+
inputs:
20+
reporting:
21+
description: 'Create GitHub issue with scenario report'
22+
type: boolean
23+
default: false
24+
skip_report_on_pass:
25+
description: 'Skip filing issue when all scenarios pass'
26+
type: boolean
27+
default: true
28+
29+
jobs:
30+
foc-devnet-test:
31+
strategy:
32+
fail-fast: false
33+
max-parallel: 1
34+
matrix:
35+
include:
36+
- name: stability
37+
init_flags: "--curio latesttag:pdpv0 --filecoin-services latesttag:main"
38+
issue_label: scenarios-run-stability
39+
issue_title: "FOC Devnet scenarios run report (stability)"
40+
- name: frontier
41+
init_flags: "--curio gitbranch:pdpv0 --filecoin-services gitbranch:main"
42+
issue_label: scenarios-run-frontier
43+
issue_title: "FOC Devnet scenarios run report (frontier)"
44+
uses: ./.github/workflows/ci_run.yml
45+
with:
46+
name: ${{ matrix.name }}
47+
init_flags: ${{ matrix.init_flags }}
48+
# Reporting is always on for scheduled runs; for manual dispatch it follows the input.
49+
enable_reporting: ${{ github.event_name == 'schedule' || inputs.reporting == true }}
50+
skip_report_on_pass: ${{ inputs.skip_report_on_pass != false }}
51+
issue_label: ${{ matrix.issue_label }}
52+
issue_title: ${{ matrix.issue_title }}
53+
secrets: inherit
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
# Runs on every pull request targeting main.
3+
#
4+
# Executes lint checks and a single CI run with the default config
5+
# (no special init_flags). Issue reporting is disabled — that is
6+
# reserved for the nightly schedule run.
7+
8+
name: CI (Pull Request)
9+
10+
on:
11+
pull_request:
12+
branches: ['main']
13+
14+
jobs:
15+
lint:
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 10
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Setup Rust toolchain
23+
uses: actions-rust-lang/setup-rust-toolchain@v1
24+
with:
25+
components: rustfmt, clippy
26+
27+
- name: Setup Python tools
28+
run: |
29+
sudo apt-get update
30+
sudo apt-get install -y pipx
31+
pipx install black
32+
echo "$HOME/.local/bin" >> $GITHUB_PATH
33+
34+
- name: Run linting (check mode)
35+
run: FIX=0 ./scripts/lint.sh
36+
37+
foc-devnet-test:
38+
needs: lint
39+
uses: ./.github/workflows/ci_run.yml
40+
with:
41+
name: default
42+
init_flags: ''
43+
enable_reporting: false
44+
secrets: inherit

0 commit comments

Comments
 (0)