-
Notifications
You must be signed in to change notification settings - Fork 10
50 lines (46 loc) · 1.28 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: CI
on:
push:
branches: [ master, workflow-improvements ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings -W unreachable-pub -W rust-2021-compatibility"
RUSTDOCFLAGS: -Dwarnings
RUSTUP_MAX_RETRIES: 10
RUST_BACKTRACE: full
CI: 1
CARGO_NET_RETRY: 10
CARGO_INCREMENTAL: 0
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: apt update
run: sudo apt update
- name: apt install libsystemd-dev
run: sudo apt install -y --no-install-recommends libsystemd-dev
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Cache Dependencies
uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72
- name: Build
run: cargo test --no-run --all-targets --all-features
- name: Run tests
run: cargo test --all-targets --all-features
- name: Install Clippy
run: rustup component add clippy --toolchain stable-x86_64-unknown-linux-gnu
- name: Clippy
run: cargo +stable clippy --all-targets --all-features
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fmt
run: cargo fmt -- --check