8000 Improve GH Actions · rust-osdev/ucs2-rs@f921425 · GitHub
[go: up one dir, main page]

Skip to content

Commit f921425

Browse files
Improve GH Actions
Add Clippy and rustdoc to GH Actions workflow
1 parent f6787fa commit f921425

File tree

2 files changed

+61
-7
lines changed

2 files changed

+61
-7
lines changed

.github/workflows/rust.yml

Lines changed: 60 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,67 @@ name: Rust
33
on: [push]
44

55
jobs:
6-
build:
6+
check:
7+
name: Check
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout sources
11+
uses: actions/checkout@v1
12+
13+
- name: Install stable toolchain
14+
uses: actions-rs/toolchain@v1
15+
with:
16+
profile: minimal
17+
toolchain: stable
18+
override: true
719

20+
- name: Run cargo check
21+
uses: actions-rs/cargo@v1
22+
with:
23+
command: check
24+
25+
test:
26+
name: Test Suite
827
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout sources
30+
uses: actions/checkout@v1
31+
32+
- name: Install stable toolchain
33+
uses: actions-rs/toolchain@v1
34+
with:
35+
profile: minimal
36+
toolchain: stable
37+
override: true
938

39+
- name: Run cargo test
40+
uses: actions-rs/cargo@v1
41+
with:
42+
command: test
43+
44+
lints:
45+
name: Lints
46+
runs-on: ubuntu-latest
1047
steps:
11-
- uses: actions/checkout@v1
12-
- name: Build
13-
run: cargo build --verbose
14-
- name: Run tests
15-
run: cargo test --verbose
48+
- name: Checkout sources
49+
uses: actions/checkout@v1
50+
51+
- name: Install stable toolchain
52+
uses: actions-rs/toolchain@v1
53+
with:
54+
profile: minimal
55+
toolchain: stable
56+
override: true
57+
components: rustfmt, clippy
58+
59+
- name: Run cargo fmt
60+
uses: actions-rs/cargo@v1
61+
with:
62+
command: fmt
63+
args: --all -- --check
64+
65+
- name: Run cargo clippy
66+
uses: actions-rs/cargo@v1
67+
with:
68+
command: clippy
69+
args: -- -D warnings

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#![no_std]
44

55
#[deny(missing_docs)]
6-
#[cfg_attr(feature = "cargo-clippy", deny(clippy))]
6+
#[deny(clippy::all)]
77

88
/// Possible errors returned by the API.
99
#[derive(Debug, Copy, Clone)]

0 commit comments

Comments
 (0)
0