Skip to content

Commit

Permalink
add check_commit for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
LemonHX committed Apr 15, 2022
1 parent c8449e6 commit ed450b1
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
command: test
args: -p starcoin-move-prover
- name: check changed files
run: bash ./scripts/changed-files.sh
run: bash ./scripts/changed_files.sh
- name: integration test dev environment
env:
RUST_LOG: info
Expand Down
5 changes: 5 additions & 0 deletions scripts/changed_files.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$diff=$(git diff)
Write-Host "$diff"

$changed_files=$(git status --porcelain)
Write-Host "$changed_files"
File renamed without changes.
16 changes: 16 additions & 0 deletions scripts/check_commit.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
$STARCOIN_DIR = (get-item $PSScriptRoot).parent.FullName

# cargo fmt check
cargo fmt -- --check
# cargo clippy check
cargo clippy --all-targets -- -D warnings
# generate stdlib
cargo run -p stdlib
# generate genesis
cargo run -p starcoin-genesis
# generate rpc schema document
cargo run -p starcoin-rpc-api -- -d ./rpc/generated_rpc_schema
# test config file
cargo test -p starcoin-config test_example_config_compact
# check changed files
. "${STARCOIN_DIR}/scripts/changed_files.ps1"
2 changes: 1 addition & 1 deletion scripts/check_commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ cargo run -p starcoin-rpc-api -- -d ./rpc/generated_rpc_schema
# test config file
cargo test -p starcoin-config test_example_config_compact
# check changed files
"${STARCOIN_DIR}"/scripts/changed-files.sh
"${STARCOIN_DIR}"/scripts/changed_files.sh

0 comments on commit ed450b1

Please sign in to comment.