This repository was archived by the owner on Jan 27, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
59 lines (53 loc) · 1.46 KB
/
checks.yml
File metadata and controls
59 lines (53 loc) · 1.46 KB
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
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 --cfg tokio_unstable"
LANG: C.UTF-8
LC_ALL: C.UTF-8
jobs:
check:
name: Format & Lint
runs-on: ubuntu-22.04
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 Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: v1.1.0
- 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
RUST_BACKTRACE=1 cargo test -- --nocapture