-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (47 loc) · 1.29 KB
/
checks.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
name: Check Format & Lint
on:
pull_request:
branches: [ main, master, develop ]
paths:
- '**/*.rs'
- '**/Cargo.*'
push:
branches: [ main, master, develop ]
paths:
- '**/*.rs'
- '**/Cargo.*'
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"
jobs:
check:
name: Format & Lint
runs-on: xl-runner
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.83.0
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
cache-directories: "**/target"
cache-on-failure: true
- name: Run format check
run: cargo fmt -- --check
- name: Run clippy
if: success() || failure()
run: cargo clippy -- -D warnings
#- name: Install Redis binary
#run: |
#sudo apt-get update
#sudo apt-get install -y redis-server
## Ensure redis-server binary is installed but don't start the service
#sudo systemctl stop redis || true
#sudo systemctl disable redis || true
#- name: Run tests
#if: success() || failure()
#run: |
#redis-server --version
#cargo test -- --nocapture