From 165111fabdbd50de200078ffc48f3e8ba48dd8b7 Mon Sep 17 00:00:00 2001 From: Morgan Mccauley Date: Tue, 9 Jan 2024 10:22:01 +1300 Subject: [PATCH] ci: Add checks for Coordinator --- .github/workflows/coordinator-ci.yml | 73 ++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/workflows/coordinator-ci.yml diff --git a/.github/workflows/coordinator-ci.yml b/.github/workflows/coordinator-ci.yml new file mode 100644 index 000000000..9b84f08d7 --- /dev/null +++ b/.github/workflows/coordinator-ci.yml @@ -0,0 +1,73 @@ +name: Coordinator + +on: + push: + branches: [ main ] + paths: + - "coordinator/**" + pull_request: + paths: + - "coordinator/**" + +env: + CARGO_TERM_COLOR: always + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Protoc + uses: arduino/setup-protoc@v2 + - name: Check + working-directory: ./coordinator + run: cargo check + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Protoc + uses: arduino/setup-protoc@v2 + - name: Test + working-directory: ./coordinator + run: cargo test + + + format: + runs-on: ubuntu-20.04 + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Protoc + uses: arduino/setup-protoc@v2 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: 1.70.0 + override: true + profile: minimal + components: rustfmt + - name: Check formatting + working-directory: ./coordinator + run: | + cargo fmt -- --check + + clippy: + runs-on: ubuntu-20.04 + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Protoc + uses: arduino/setup-protoc@v2 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: 1.70.0 + override: true + profile: minimal + components: clippy + - name: Clippy check + working-directory: ./coordinator + run: | + cargo clippy