mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-05 13:15:21 +00:00
Add lint checks & change actions-rs/toolchain to dtolnay/rust-toolchain
This commit is contained in:
parent
9403f30157
commit
65c4fd2fec
6
.github/workflows/linutil.yml
vendored
6
.github/workflows/linutil.yml
vendored
|
@ -30,13 +30,11 @@ jobs:
|
|||
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: ${{ runner.os }}-cargo-index-
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Build
|
||||
run: cargo build --target-dir=build --release --verbose
|
||||
- uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: Commit Linutil
|
||||
file_pattern: 'build/release/linutil'
|
||||
if: success()
|
||||
if: success()
|
||||
|
|
22
.github/workflows/rust.yml
vendored
22
.github/workflows/rust.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: Rust Check
|
||||
name: Rust Checks
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
@ -12,6 +12,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
- uses: actions/checkout@v4
|
||||
- name: Cache Cargo registry
|
||||
uses: actions/cache@v4
|
||||
|
@ -26,8 +27,19 @@ jobs:
|
|||
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: ${{ runner.os }}-cargo-index-
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Build
|
||||
run: cargo check
|
||||
run: cargo check
|
||||
|
||||
lints:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Run cargo fmt
|
||||
run: cargo --fmt --all check
|
||||
- name: Run cargo clippy
|
||||
run: cargo clippy
|
||||
|
|
Loading…
Reference in New Issue
Block a user