Files
ere/.github/workflows/rust-checks.yml
Ignacio Hagopian f05aa50032 docker: separate workspace and guest program directories (#57)
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Co-authored-by: kevaundray <kevtheappdev@gmail.com>
2025-07-20 18:58:02 -03:00

60 lines
1.3 KiB
YAML

name: Rust Checks
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
check-fmt:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --check --all
check-tests:
name: Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
crate: [ere-sp1]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Check clippy
run: cargo clippy --bins --lib --examples --tests --benches --all-features -p ${{ matrix.crate }}
- name: Run tests
run: cargo test --release -p ${{ matrix.crate }}