-
Notifications
You must be signed in to change notification settings - Fork 7
54 lines (48 loc) · 1.26 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
51
52
53
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
fmt:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
components: rustfmt, clippy
- name: Check code format
working-directory: ./code
run: cargo fmt --all -- --check
- name: Clippy
working-directory: ./code
run: cargo clippy --all-targets --all-features -- -D warnings
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path code/Cargo.toml --release --no-fail-fast --all-features
docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install mdbook
run: |
wget https://github.com/rust-lang/mdBook/releases/download/v0.4.21/mdbook-v0.4.21-x86_64-unknown-linux-gnu.tar.gz -O ~/mdbook.tar.gz
tar xvf ~/mdbook.tar.gz -C ~
- name: Build docs
working-directory: ./docs
run: ~/mdbook build