-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Just[^1] is a modern command runner that makes it easy to define and run project-specific commands in a project. We use it to define the commands to format, lint, and test the code. [^1]: https://github.com/casey/just
- Loading branch information
Showing
2 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,9 @@ jobs: | |
if: needs.detect-changes.outputs.any_changed == 'true' | ||
|
||
steps: | ||
- name: Install Just | ||
run: sudo snap install --edge --classic just | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
|
@@ -62,7 +65,7 @@ jobs: | |
uses: mozilla-actions/[email protected] | ||
|
||
- name: Run Clippy | ||
run: cargo clippy --all-targets --all-features -- -D warnings | ||
run: just lint | ||
|
||
style: | ||
name: Check style | ||
|
@@ -72,11 +75,14 @@ jobs: | |
if: needs.detect-changes.outputs.any_changed == 'true' | ||
|
||
steps: | ||
- name: Install Just | ||
run: sudo snap install --edge --classic just | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run Rustfmt | ||
run: cargo fmt --all -- --check | ||
run: just format --check | ||
|
||
test: | ||
name: Run tests | ||
|
@@ -86,6 +92,9 @@ jobs: | |
if: needs.detect-changes.outputs.any_changed == 'true' | ||
|
||
steps: | ||
- name: Install Just | ||
run: sudo snap install --edge --classic just | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
|
@@ -98,4 +107,4 @@ jobs: | |
uses: mozilla-actions/[email protected] | ||
|
||
- name: Run tests | ||
run: cargo test --all-features --all-targets | ||
run: just test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# List available commands | ||
_default: | ||
just --list | ||
|
||
format ARGS: | ||
cargo fmt --all -- {{ARGS}} | ||
|
||
lint: | ||
cargo clippy --all-targets --all-features -- -D warnings | ||
|
||
run ARGS: | ||
cargo run -- {{ARGS}} | ||
|
||
test: | ||
cargo test --all-features --all-targets |