From 70c0caa119a8b98d5e0ac17f45da5666010f8c2e Mon Sep 17 00:00:00 2001 From: Heiko Seeberger Date: Fri, 29 Sep 2023 19:17:30 +0300 Subject: [PATCH] build: use just for GH workflows --- .github/workflows/ci.yaml | 19 ++++++++++++------- justfile | 3 +++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bee88bc..489afe4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,7 +12,7 @@ on: - main jobs: - fmt-lint-test: + ci: runs-on: ubuntu-latest steps: - name: Check out @@ -26,17 +26,22 @@ jobs: rustup component add rustfmt --toolchain nightly # rustup component add clippy --toolchain nightly + - name: Install just + uses: taiki-e/install-action@v2 + with: + tool: just + - name: Install protoc uses: arduino/setup-protoc@v2 - name: Set up Rust cache uses: Swatinem/rust-cache@v2 - - name: Check code format (cargo fmt) - run: cargo +nightly fmt --check + - name: Check code format + run: just fmt_check - - name: Lint (cargo clippy) - run: cargo clippy --no-deps -- -D warnings + - name: Run linter + run: just lint - - name: Test (cargo test) - run: cargo test + - name: Run tests + run: just test diff --git a/justfile b/justfile index 49d3a02..2a7b5b7 100644 --- a/justfile +++ b/justfile @@ -8,6 +8,9 @@ check: fmt: cargo +nightly fmt +fmt_check: + cargo +nightly fmt --check + lint: cargo clippy --no-deps -- -D warnings