-
Notifications
You must be signed in to change notification settings - Fork 5
68 lines (63 loc) · 2.04 KB
/
main.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
63
64
65
66
67
68
name: CI
on: [push]
jobs:
check-broken-md-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache unpublished "broken-md-links" dependency
uses: actions/[email protected]
with:
path: ~/.cargo/bin
key: broken-md-links-tool
- name: Get "broken-md-links" tool
run: |
if ! type broken-md-links > /dev/null; then
cargo install --git https://github.com/ClementNerma/broken-md-links.git
fi
- name: Look for broken MD links
run: broken-md-links ${GITHUB_WORKSPACE} --recursive
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache cargo registry
uses: actions/[email protected]
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/[email protected]
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/[email protected]
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Run Cargo tests
run: |
cargo test -- --test-threads=1
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache cargo registry
uses: actions/[email protected]
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/[email protected]
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/[email protected]
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Check linting
run: |
cargo clippy -- -D warnings