-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (36 loc) · 991 Bytes
/
test.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
name: Tests
env:
SQLX_OFFLINE: true
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
check:
name: Lint, Format, and Build
runs-on: chortle
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
- name: Setup Problem Matchers
uses: r7kamura/rust-problem-matchers@v1
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Run Formatter
run: cargo fmt --all --check
- name: Run Clippy
run: cargo clippy -- -D warnings
- name: Build
run: cargo build --all-features --release