-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (51 loc) · 1.37 KB
/
pr_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
54
name: CI for Pull Requests
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
jobs:
crates_ci:
name: CI for Crates
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
crates/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: run tests
run: cargo test
working-directory: crates
- name: run doc build
run: cargo doc
working-directory: crates
- name: check formatting
run: cargo fmt -- --check
working-directory: crates
- name: check lint
run: cargo clippy
working-directory: crates
book_check:
name: CI for Book
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-mdbook-0.4
- run: cargo install mdbook --no-default-features --vers "^0.4" --locked || echo "already installed"
- name: run tests
run: mdbook test
working-directory: book