forked from Synapse-bridgez/synapse-core
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.01 KB
/
Copy pathcli-synapse-ci.yml
File metadata and controls
46 lines (38 loc) · 1.01 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
name: Synapse CLI CI
on:
push:
paths:
- 'cli/synapse-cli/**'
pull_request:
paths:
- 'cli/synapse-cli/**'
jobs:
ci:
name: clippy, fmt, test
runs-on: ubuntu-latest
defaults:
run:
working-directory: cli/synapse-cli
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache Cargo registry and build artifacts
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
cli/synapse-cli/target/
key: ${{ runner.os }}-rust-cli-${{ hashFiles('cli/synapse-cli/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-rust-cli-
- name: Check formatting
run: cargo fmt --check
- name: Run clippy
run: cargo clippy -- -D warnings
- name: Run tests
run: cargo test