Skip to content

Commit

Permalink
ci: update lint with nix
Browse files Browse the repository at this point in the history
  • Loading branch information
yanganto committed Apr 23, 2024
1 parent 960003f commit e312ee5
Showing 1 changed file with 15 additions and 33 deletions.
48 changes: 15 additions & 33 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,44 +14,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install rustc nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
name: Formatting
with:
command: fmt
args: --all -- --check
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
- name: Formatting
run: nix develop .#nightly -c cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install rustc stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: clippy
- uses: actions-rs/cargo@v1
name: Clippy
with:
command: clippy
args: --workspace --all-features --all-targets -- -D warnings
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
- name: Clippy
run: nix develop .#stable -c cargo clippy --workspace --all-features --all-targets -- -D warnings
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install rustc nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rust-docs
- uses: actions-rs/cargo@v1
name: Doc
with:
command: doc
args: --workspace --all-features
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
- name: Doc
run: nix develop .#nightly -c cargo doc --workspace --all-features

0 comments on commit e312ee5

Please sign in to comment.