-
Notifications
You must be signed in to change notification settings - Fork 15
62 lines (49 loc) · 1.44 KB
/
build.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
51
52
53
54
55
56
57
58
59
60
61
62
name: Build
on:
pull_request:
push:
branches:
- master
jobs:
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- name: Setup yt-dlp PPA
run: sudo add-apt-repository ppa:tomtomtom/yt-dlp
- name: Install yt-dlp
run: sudo apt update && sudo apt install -y yt-dlp
- name: Run cargo test
run: cargo test --release
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
submodules: true
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Install extra components
run: rustup component add clippy rust-docs rustfmt
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run cargo clippy
run: cargo clippy -- -D warnings
- name: Run rustdoc lints
env:
RUSTDOCFLAGS: "-D missing_docs -D rustdoc::missing_doc_code_examples"
run: cargo doc --workspace --all-features --no-deps --document-private-items