Add GitHub CI security and release workflows
This commit is contained in:
parent
9422cd0da4
commit
1006f41e45
10 changed files with 396 additions and 0 deletions
90
.github/workflows/ci.yml
vendored
Normal file
90
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ci-${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
fmt-clippy-docs:
|
||||
name: fmt, clippy, docs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: Cache Cargo
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Check formatting
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
- name: Run clippy
|
||||
run: cargo clippy --workspace --all-targets -- -D warnings
|
||||
|
||||
- name: Build docs
|
||||
run: cargo doc --workspace --no-deps
|
||||
|
||||
test:
|
||||
name: test (${{ matrix.os }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
env:
|
||||
GETH_TEST_SKIP_IROH: 1
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Cache Cargo
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Check workspace
|
||||
run: cargo check --workspace --all-targets
|
||||
|
||||
- name: Test workspace without live Iroh integration
|
||||
run: cargo test --workspace
|
||||
|
||||
iroh-integration:
|
||||
name: iroh integration smoke tests
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Cache Cargo
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Run Iroh-heavy CLI integration tests serially
|
||||
run: cargo test -p geth --test bootstrap -- --test-threads=1
|
||||
|
||||
- name: Run Iroh-heavy node integration tests
|
||||
run: |
|
||||
cargo test -p geth-node peer_ping_uses_signed_peer_card_over_iroh -- --nocapture
|
||||
cargo test -p geth-node overlay_packets_route_over_dedicated_iroh_alpn_with_authorization -- --nocapture
|
||||
Loading…
Reference in a new issue