-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (46 loc) · 1.57 KB
/
rust.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
name: CI
on:
push:
branches:
- main
- develop
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
platform:
- { target: x86_64-pc-windows-msvc, os: windows-latest }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
- { target: x86_64-apple-darwin, os: macos-latest }
- { target: x86_64-pc-windows-gnu, os: windows-latest, host: -x86_64-pc-windows-gnu }
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v3
- name: Build sqlite
run: cargo build --features sqlite --all-targets
- name: Run tests sqlite
run: cargo test --features sqlite --all-targets
- name: Document tests sqlite
run: cargo test --features sqlite --doc
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: prepare
run: |
rustup component add clippy
echo "clippy_flags=-W clippy::dbg_macro -A clippy::uninlined_format_args -A deprecated" >> $GITHUB_ENV
- name: clippy sqlite
run: cargo clippy --all-targets --features sqlite -- ${{ env.clippy_flags }}
- name: clippy mysql
run: cargo clippy --all-targets --features mysql -- ${{ env.clippy_flags }}
- name: clippy postgres
run: cargo clippy --all-targets --features postgres -- ${{ env.clippy_flags }}
- name: clippy all features
run: cargo clippy --all-targets --all-features -- ${{ env.clippy_flags }}