fix lint #102
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
on: [push, pull_request] | |
env: | |
CARGO_TERM_COLOR: always | |
BENCHER_PROJECT: language | |
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }} | |
BENCHER_ADAPTER: rust_bench | |
jobs: | |
rust: | |
runs-on: buildjet-2vcpu-ubuntu-2204-arm | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Nightly | |
run: rustup default nightly | |
- name: Format | |
run: | | |
rustup component add rustfmt | |
cargo fmt --check | |
# - name: Audit | |
# run: | | |
# cargo install cargo-audit | |
# cargo audit | |
- name: Check | |
run: cargo check | |
- name: Clippy | |
run: | | |
rustup component add clippy | |
cargo clippy --tests -- --deny warnings | |
# - name: Dependencies | |
# run: | | |
# cargo install cargo-udeps | |
# cargo udeps | |
- name: Test | |
run: cargo test | |
# https://github.com/taiki-e/cargo-llvm-cov#continuous-integration | |
# - name: Install cargo-llvm-cov | |
# uses: taiki-e/install-action@cargo-llvm-cov | |
# - name: Generate code coverage | |
# run: cargo llvm-cov --lcov --output-path lcov.info | |
# - name: Upload coverage to Codecov | |
# uses: codecov/codecov-action@v3 | |
# with: | |
# files: lcov.info | |
# fail_ci_if_error: true | |
# - name: Install Bencher | |
# uses: bencherdev/bencher@main | |
# - name: Benchmark with Bencher | |
# run: | | |
# bencher run \ | |
# --err \ | |
# --github-actions ${{ secrets.GITHUB_TOKEN }} \ | |
# --if-branch "$GITHUB_REF_NAME" \ | |
# --else-if-branch "$GITHUB_BASE_REF" \ | |
# --else-if-branch main \ | |
# "cargo bench" |