Skip to content

Commit

Permalink
Check cargo fmt in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvdb committed Mar 23, 2024
1 parent 0402a39 commit 582230c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,17 @@ jobs:
echo "C:\ProgramData\chocolatey\lib\SQLite\tools" >> $GITHUB_PATH
echo "SQLITE3_LIB_DIR=C:\ProgramData\chocolatey\lib\SQLite\tools" >> $GITHUB_ENV
- name: Add Rust nightly toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
components: rustfmt
- name: Install Rust tools
run: cargo install typos-cli
- name: Build
run: make build
- name: Lint
run: make lint
run: make lint-ci
- name: Test Core
run: cd butane_core && cargo test --all-features
- name: Test Codegen
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ build :
lint :
$(CARGO) clippy --all-features -- -D warnings

lint-ci : doclint lint spellcheck check-fmt

check : build test doclint lint spellcheck
check : build test doclint lint spellcheck check-fmt


test :
Expand All @@ -25,6 +26,12 @@ clean :
$(CARGO) clean


fmt :
cd butane && $(CARGO_NIGHTLY) fmt

check-fmt :
cd butane && $(CARGO_NIGHTLY) fmt --check

spellcheck :
typos

Expand Down

0 comments on commit 582230c

Please sign in to comment.