Skip to content

fix(ci): grant actions:write and switch buildx cache to mode=min #246

fix(ci): grant actions:write and switch buildx cache to mode=min

fix(ci): grant actions:write and switch buildx cache to mode=min #246

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17
- run: cargo test --all-features
audit:
name: Audit
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998 # v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17
with:
components: clippy
- run: cargo clippy --all-features --all-targets -- -D warnings
check-format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17
with:
components: rustfmt
- uses: actions-rust-lang/rustfmt@4066006ec54a31931b9b1fddfd38f2fdf2d27143 # v1.1.2
# Anvil-driven integration suites. Both files carry `#[ignore]` so the
# vanilla `Test` job above skips them; we run them here explicitly. Serial
# (`--test-threads=1`) because the Prometheus recorder is a process-wide
# singleton. First run per key fetches Multicall3 + WETH9 bytecode from a
# public RPC; the cache below keeps subsequent runs offline.
integration:
name: Integration (anvil)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17
- uses: foundry-rs/foundry-toolchain@c7450ba673e133f5ee30098b3b54f444d3a2ca2d # v1.8.0
with:
version: stable
- name: Cache on-chain bytecode fixtures
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: target/test-cache
key: integration-fixtures-v1
- name: Run integration suite
run: cargo test --test integration -- --ignored --test-threads=1
- name: Run session-lifecycle suite
run: cargo test --test session_lifecycle -- --ignored --test-threads=1
- name: Run token-list-update suite
run: cargo test --test token_list_update -- --ignored --test-threads=1