fix: make tests independent of system locale #3111
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
env: | |
CARGO_INCREMENTAL: 0 | |
RUST_BACKTRACE: short | |
jobs: | |
static-analysis: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Forbid nocommit string | |
run: | | |
if results=$(git grep --column --line-number --only-matching '@''nocommit'); then | |
echo "$results" | |
awk <<<"$results" -F ':' '{ print "::error file=" $1 ",line=" $2 ",col=" $3 "::Illegal string: " $4 }' | |
exit 1 | |
fi | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
components: rustfmt, clippy | |
override: true | |
- name: Cache dependencies | |
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 | |
- name: Run `cargo fmt` | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Run `cargo clippy` | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
# Allow `--allow renamed_and_removed_lints` because the new lint name | |
# may not be available in our oldest-supported Rust version. | |
args: --workspace --all-features --all-targets -- --deny warnings --allow renamed_and_removed_lints | |
- name: Run `cargo doc` | |
env: | |
RUSTDOCFLAGS: "--deny warnings" | |
run: cargo doc --workspace --no-deps |