mirror of
https://github.com/eth-act/ere.git
synced 2026-02-19 11:54:42 -05:00
69 lines
1.8 KiB
YAML
69 lines
1.8 KiB
YAML
name: Test and clippy common crates
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
test:
|
|
name: Test and clippy crate ${{ matrix.crate }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
crate:
|
|
- ere-zkvm-interface
|
|
- ere-io
|
|
- ere-dockerized
|
|
- ere-common
|
|
- ere-compiler
|
|
- ere-server
|
|
- ere-build-utils
|
|
- ere-compile-utils
|
|
- ere-test-utils
|
|
include:
|
|
# Test disabled (Test in per-zkVM workflows)
|
|
- crate: ere-dockerized
|
|
skip_test: true
|
|
# Clippy only lib (Binary clippy in per-zkVM workflows)
|
|
- crate: ere-compiler
|
|
clippy_only_lib: true
|
|
- crate: ere-server
|
|
clippy_only_lib: true
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
# Needed to run test of ere-server
|
|
- name: Install protoc
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y protobuf-compiler
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy
|
|
|
|
- name: Cache dependencies
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Run cargo clippy
|
|
run: cargo clippy ${{ matrix.clippy_only_lib == true && '--lib' || '--all-targets' }} --package ${{ matrix.crate }} -- -D warnings
|
|
|
|
- name: Run cargo test on documentation
|
|
run: cargo test --doc --package ${{ matrix.crate }}
|
|
|
|
- name: Run cargo test
|
|
if: matrix.skip_test != true
|
|
run: cargo test --lib --release --package ${{ matrix.crate }}
|