Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/ci_nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
# Runs on a nightly schedule (and optionally via manual dispatch).
#
# Executes the full CI matrix: stability (latest tags) and frontier
# (latest branches). Both runs file GitHub issues with their results
# unless manually suppressed via workflow_dispatch inputs.

name: CI (Nightly)

on:
schedule:
# Nightly at 03:00 UTC
- cron: '0 3 * * *'
workflow_dispatch:
inputs:
reporting:
description: 'Create GitHub issue with scenario report'
type: boolean
default: false
skip_report_on_pass:
description: 'Skip filing issue when all scenarios pass'
type: boolean
default: true

jobs:
foc-devnet-test:
strategy:
fail-fast: false
max-parallel: 1
matrix:
include:
- name: stability
init_flags: "--curio latesttag:pdp/v* --filecoin-services latesttag:v*"
issue_label: scenarios-run-stability
issue_title: "FOC Devnet scenarios run report (stability)"
- name: frontier
init_flags: "--curio gitbranch:pdpv0 --filecoin-services gitbranch:main"
issue_label: scenarios-run-frontier
issue_title: "FOC Devnet scenarios run report (frontier)"
uses: ./.github/workflows/ci_run.yml
with:
name: ${{ matrix.name }}
init_flags: ${{ matrix.init_flags }}
# Reporting is always on for scheduled runs; for manual dispatch it follows the input.
enable_reporting: ${{ github.event_name == 'schedule' || inputs.reporting == true }}
# On scheduled runs, such as nightly `inputs.skip_report_on_pass` is absent (empty string), so we cannot rely
# on it directly. The LHS of || short-circuits to true for any non-dispatch trigger, giving
# the desired default (skip on pass). For workflow_dispatch the LHS is false, so the user's
# choice in inputs.skip_report_on_pass takes effect.
skip_report_on_pass: ${{ github.event_name != 'workflow_dispatch' || inputs.skip_report_on_pass }}
issue_label: ${{ matrix.issue_label }}
issue_title: ${{ matrix.issue_title }}
secrets: inherit
64 changes: 64 additions & 0 deletions .github/workflows/ci_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
# Runs on every pull request targeting main, and on every merge to main.
#
# Executes lint checks, cargo tests, and a single CI run with the default
# config (no special init_flags). Issue reporting is disabled — that is
# reserved for the nightly schedule run.

name: CI (Pull Request)

on:
pull_request:
branches: ['main']
push:
branches: ['main']

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v6

- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt, clippy

- name: Setup Python tools
run: |
sudo apt-get update
sudo apt-get install -y pipx
pipx install black
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Run linting (check mode)
run: FIX=0 ./scripts/lint.sh

cargo-test:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v6

- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libssl-dev

- name: Run tests
run: cargo test --all-targets --all-features

foc-devnet-test:
needs: [lint, cargo-test]
uses: ./.github/workflows/ci_run.yml
with:
name: default
init_flags: ''
enable_reporting: false
secrets: inherit
Loading
Loading