Skip to content

Commit

Permalink
Improve rust lint task on CI (#51)
Browse files Browse the repository at this point in the history
* ci: dont't execute `rustup update` every time

* ci: add Makefile
  • Loading branch information
bluele authored Sep 10, 2019
1 parent f8be667 commit 51b2a67
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,19 @@ jobs:
steps:
- checkout
- run:
name: "install clippy & rustfmt"
name: "setup lint tools"
command: |
rustup update
rustup component add clippy
rustup component add rustfmt
- run:
name: "fmt check"
command: |
cargo fmt -- --check
make lint-tools
working_directory: hmcdk
- run:
name: "clippy"
name: "lint"
command: |
cargo clippy -- -D warnings
make lint
working_directory: hmcdk
- run:
name: "test"
command: |
cargo test
make test
working_directory: hmcdk

integration-test:
Expand Down
12 changes: 12 additions & 0 deletions hmcdk/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
lint-tools:
rustup component add clippy
rustup component add rustfmt

lint:
cargo fmt -- --check
cargo clippy -- -D warnings

test:
cargo test

.PHONY: lint-tools lint test

0 comments on commit 51b2a67

Please sign in to comment.