-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (39 loc) · 1.22 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: test suite
on:
pull_request:
push:
branches:
- main
jobs:
cargo-fmt:
runs-on: ubuntu-latest
strategy:
matrix:
simulations: ["eth_consensus", "censoring", "smoke", "scoring"]
steps:
- uses: actions/checkout@v2
- name: Get latest version of stable rust
run: rustup update stable
- name: Check formatting with cargofmt
run: cd "${{ matrix.simulations }}" && cargo fmt --all -- --check
clippy:
needs: cargo-fmt
name: clippy
runs-on: ubuntu-latest
strategy:
matrix:
simulations: ["eth_consensus", "censoring", "smoke", "scoring"]
steps:
- uses: actions/checkout@v1
- name: Install protoc
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Get latest version of stable Rust
run: rustup update stable
- name: Install Protoc
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
- name: Lint code for quality and style with Clippy
run: cd "${{ matrix.simulations }}" && cargo clippy --workspace --tests -- -D warnings
- name: Certify Cargo.lock freshness
run: cd "${{ matrix.simulations }}" && git diff --exit-code Cargo.lock