-
Notifications
You must be signed in to change notification settings - Fork 11
75 lines (70 loc) · 1.91 KB
/
pr.yaml
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
69
70
71
72
73
74
75
name: pr
on:
pull_request:
branches:
- master
jobs:
clippy:
strategy:
fail-fast: false
matrix:
db: ['', all-databases, mysql, postgres, sqlite]
db_any: ['', any]
runtime: [runtime-tokio-native-tls, runtime-tokio-rustls]
exclude:
# no-db w/ any doesn't make sense (sqlx won't compile)
- db: ''
db_any: any
# all-databases w/ any is redundant (all-databases enables any)
- db: all-databases
db_any: any
name: clippy (${{ matrix.runtime }}, ${{ matrix.db || 'no-db' }} ${{ matrix.db_any && 'w/ any' || 'w/o any' }})
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --features '${{ matrix.db }} ${{ matrix.db_any }} ${{ matrix.runtime }}' -- -D warnings
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: doc
args: --features runtime-tokio-rustls,all-databases
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: default
override: true
- uses: actions-rs/cargo@v1
with:
command: test