Skip to content

Commit

Permalink
build: use just for GH workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
hseeberger committed Sep 29, 2023
1 parent 6ca14fe commit 70c0caa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- main

jobs:
fmt-lint-test:
ci:
runs-on: ubuntu-latest
steps:
- name: Check out
Expand All @@ -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
3 changes: 3 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ check:
fmt:
cargo +nightly fmt

fmt_check:
cargo +nightly fmt --check

lint:
cargo clippy --no-deps -- -D warnings

Expand Down

0 comments on commit 70c0caa

Please sign in to comment.