Skip to content

Commit

Permalink
add formatter to CI + makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
aalu1418 committed Aug 26, 2024
1 parent 02a8105 commit 6b7bdd4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ jobs:
with:
path: contracts/target
key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

- name: format (cargo, go, yarn)
run: |
yarn install --frozen-lockfile
cd ../ # back to root
make format-contracts
git diff --stat --exit-code
- name: cargo check
env:
Expand All @@ -117,6 +124,3 @@ jobs:
cd /repo/contracts &&\
cargo check &&\
cargo clippy -- -D warnings"
# - run: cargo check
# - run: cargo clippy -- -D warnings
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,7 @@ upgrade-e2e-solana-image:
.PHONY: update-e2e-core-deps
upgrade-e2e-core-deps:
cd ./integration-tests && ../scripts/update-e2e.sh

.PHONY: format-contracts
format-contracts:
cd ./contracts && cargo fmt && go fmt ./... && yarn format

0 comments on commit 6b7bdd4

Please sign in to comment.