-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (32 loc) · 886 Bytes
/
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
name: Rust
on:
push:
branches: ["main"]
pull_request: ~
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: baptiste0928/cargo-install@v2
with:
crate: cargo-sort
- name: cargo-fmt
run: cargo fmt --check
- name: clippy
run: cargo clippy --all-features
- name: cargo-sort
run: cargo sort --check --workspace
test:
strategy:
matrix:
database-type: ["postgres", "mysql", "sqlite"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: cargo-check
run: cargo check --workspace --features ${{ matrix.database-type }}
- name: cargo-test
run: cargo test --workspace --features ${{ matrix.database-type }}