CI: Add 'cargo fmt --check' and setup rust toolchain to lint-ci
This commit is contained in:
parent
e897b77e83
commit
f3da3c03e8
2 changed files with 10 additions and 0 deletions
3
.github/workflows/lint-code.yml
vendored
3
.github/workflows/lint-code.yml
vendored
|
|
@ -30,5 +30,8 @@ jobs:
|
|||
shell: bash
|
||||
run: npm install -g prettier@3.8.1
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Lint
|
||||
run: ${{ github.workspace }}/Meta/lint-ci.sh
|
||||
|
|
|
|||
|
|
@ -52,4 +52,11 @@ else
|
|||
((FAILURES+=1))
|
||||
fi
|
||||
|
||||
if cargo fmt --check && git diff --exit-code -- ':*.rs'; then
|
||||
echo -e "[${GREEN}OK${NC}]: cargo fmt --check"
|
||||
else
|
||||
echo -e "[${BOLD_RED}FAIL${NC}]: cargo fmt --check"
|
||||
((FAILURES+=1))
|
||||
fi
|
||||
|
||||
exit "${FAILURES}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue