Skip to content

Commit 9822041

Browse files
caspervonbByron
authored andcommitted
ci: split off lint into a standalone job
1 parent 7346b1e commit 9822041

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

.github/workflows/rust.yml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v2
1919
- uses: Swatinem/rust-cache@v1
20-
- name: clippy
21-
run: cargo clippy --all
22-
- name: fmt
23-
run: cargo fmt --all -- --check
2420
- name: Setup dependencies (ubuntu)
2521
if: startsWith(matrix.os, 'ubuntu')
2622
run:
@@ -33,16 +29,6 @@ jobs:
3329
env:
3430
CI: true
3531
run: make tests
36-
- name: doc
37-
run: cargo doc
38-
- name: Check crate package size (feat. 'cargo diet')
39-
run: |
40-
curl -LSfs https://raw.githubusercontent.com/the-lean-crate/cargo-diet/master/ci/install.sh | \
41-
sh -s -- --git the-lean-crate/cargo-diet --target x86_64-unknown-linux-musl
42-
43-
# Let's not fail CI for this, it will fail locally often enough, and a crate a little bigger
44-
# than allows is no problem either if it comes to that.
45-
make check-size || true
4632

4733
build-and-test-on-windows:
4834
name: Windows
@@ -71,6 +57,28 @@ jobs:
7157
command: install
7258
args: gitoxide
7359

60+
lint:
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v1
64+
- uses: actions-rs/toolchain@v1
65+
with:
66+
profile: default
67+
toolchain: stable
68+
override: true
69+
- name: Run cargo clippy
70+
run: cargo clippy --all
71+
- name: Run cargo fmt
72+
run: cargo fmt --all -- --check
73+
- name: Run cargo diet
74+
run: |
75+
curl -LSfs https://raw.githubusercontent.com/the-lean-crate/cargo-diet/master/ci/install.sh | \
76+
sh -s -- --git the-lean-crate/cargo-diet --target x86_64-unknown-linux-musl
77+
78+
# Let's not fail CI for this, it will fail locally often enough, and a crate a little bigger
79+
# than allows is no problem either if it comes to that.
80+
make check-size || true
81+
7482
cargo-deny:
7583
runs-on: ubuntu-latest
7684
strategy:

0 commit comments

Comments
 (0)