Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "downgrade clippy to stable #108

Merged
merged 1 commit into from
Jul 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 4 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,36 +42,7 @@ jobs:
- name: Validate config
run: cargo run config example.config.toml

# TODO merge `fmt` back in after https://github.com/clap-rs/clap/issues/4733 is fixed
# and restore `clippy` to `+nightly`
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Read toolchain file
id: rust-toolchain
run: |
RUST_TOOLCHAIN=$(grep 'channel' rust-toolchain.toml | awk '{split($0,a," = "); print a[2]}' | tr -d '"')
echo "RUST_TOOLCHAIN=$RUST_TOOLCHAIN" >> $GITHUB_OUTPUT
shell: bash

- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ steps.rust-toolchain.outputs.RUST_TOOLCHAIN }}
components: clippy

- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Check clippy
run: cargo clippy --all-targets --all-features --all --verbose -- -D warnings

fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand All @@ -80,7 +51,7 @@ jobs:
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
components: rustfmt, clippy

- name: Rust cache
uses: Swatinem/rust-cache@v2
Expand All @@ -89,3 +60,6 @@ jobs:

- name: Check format
run: cargo +nightly fmt --all --check

- name: Check clippy
run: cargo +nightly clippy --all-targets --all-features --all --verbose -- -D warnings
3 changes: 1 addition & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ test:
fmt:
cargo +nightly fmt --all
lint: fmt validate-example-config
# TODO restore +nightly after fixing this: https://github.com/clap-rs/clap/issues/4733
cargo clippy --all-targets --all-features --all
cargo +nightly clippy --all-targets --all-features --all
build:
cargo build --all-targets --all-features --all
run-ci: lint build test run-integration-tests