-
Notifications
You must be signed in to change notification settings - Fork 2
80 lines (65 loc) · 1.94 KB
/
ci.yml
File metadata and controls
80 lines (65 loc) · 1.94 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"
RUST_BACKTRACE: 1
CARGO_PROFILE_DEV_DEBUG: 0
CARGO_UNSTABLE_SPARSE_REGISTRY: true
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
CACHE_ON_FAILURE: true
jobs:
test:
name: Test Suite
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v6
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt, clippy
- name: Install Claude CLI
run: |
# Create a mock claude command that just exits successfully
# This satisfies the CLI check without needing actual Claude CLI
mkdir -p $HOME/.local/bin
echo '#!/bin/bash' > $HOME/.local/bin/claude
echo 'echo "claude version 0.1.0 (mock for testing)"' >> $HOME/.local/bin/claude
chmod +x $HOME/.local/bin/claude
echo "$HOME/.local/bin" >> $GITHUB_PATH
shell: bash
- name: Build binary
run: cargo build --bins
- name: Run tests
run: cargo test --all-features
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Check formatting
run: cargo fmt --all -- --check
- name: Check documentation
run: cargo doc --no-deps --document-private-items
check:
name: Cargo Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Cache dependencies
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target/
key: ubuntu-latest-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Check all targets
run: cargo check --all-targets --all-features