clippy and fmt #2
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: Build and test | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
# Make sure CI fails on all warnings, including Clippy lints | |
RUSTFLAGS: "-Dwarnings" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Build | |
run: cargo build | |
- name: Install osmium | |
run: sudo apt install osmium-tool | |
- name: Install python test dependencies | |
working-directory: ./test | |
run: pip3 install -r requirements.txt | |
- name: Prepare and run test | |
if: success() || failure() | |
run: ./test.sh | |
working-directory: ./test | |
- name: Benchmark | |
if: success() || failure() | |
run: cargo bench | |
- name: Run clippy | |
if: success() || failure() | |
run: cargo clippy --all-targets --all-features | |
- name: Run cargo fmt | |
if: success() || failure() | |
run: cargo fmt --all -- --check |