summaryrefslogtreecommitdiff
path: root/.github/workflows/rust.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/rust.yml')
-rw-r--r--.github/workflows/rust.yml48
1 files changed, 14 insertions, 34 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index e96615b..115abeb 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -10,14 +10,9 @@ jobs:
- name: Get required packages
run: sudo apt-get install libpango1.0-dev
- uses: actions/checkout@v4
- - uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: stable
- override: true
- - uses: actions-rs/cargo@v1
- with:
- command: check
+ - uses: dtolnay/rust-toolchain@stable
+ - name: Check
+ run: cargo check --all --all-features
test:
name: Test Suite
@@ -26,14 +21,9 @@ jobs:
- name: Get required packages
run: sudo apt-get install libpango1.0-dev
- uses: actions/checkout@v4
- - uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: stable
- override: true
- - uses: actions-rs/cargo@v1
- with:
- command: test
+ - uses: dtolnay/rust-toolchain@stable
+ - name: Tests
+ run: cargo test --all --all-features
fmt:
name: Rustfmt
@@ -42,16 +32,11 @@ jobs:
- name: Get required packages
run: sudo apt-get install libpango1.0-dev
- uses: actions/checkout@v4
- - uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: stable
- override: true
- - run: rustup component add rustfmt
- - uses: actions-rs/cargo@v1
+ - uses: dtolnay/rust-toolchain@stable
with:
- command: fmt
- args: --all -- --check
+ components: rustfmt
+ - name: Fmt check
+ run: rustfmt --check --edition 2021 $(fdfind -e rs)
clippy:
name: Clippy
@@ -60,13 +45,8 @@ jobs:
- name: Get required packages
run: sudo apt-get install libpango1.0-dev
- uses: actions/checkout@v4
- - uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: stable
- override: true
- - run: rustup component add clippy
- - uses: actions-rs/cargo@v1
+ - uses: dtolnay/rust-toolchain@stable
with:
- command: clippy
- args: -- -D warnings -A unknown-lints
+ components: clippy
+ - name: Clippy check
+ run: cargo clippy --all --all-features -- -D warnings -A unknown-lints