-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (81 loc) · 2.44 KB
/
ci.yml
File metadata and controls
96 lines (81 loc) · 2.44 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
jobs:
check:
name: Check & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
# 1. Formatierung
- name: Format check
run: cargo fmt --all -- --check
# 2. Clippy (streng)
- name: Clippy (workspace)
run: cargo clippy --workspace --all-targets -- -D warnings
# 3. Clippy without MCP (--no-default-features)
- name: Clippy (without MCP)
run: cargo clippy --workspace --all-targets --no-default-features -- -D warnings
# 4. Tests (default features, includes MCP)
- name: Tests (workspace)
run: cargo test --workspace
# 5. Tests without MCP
- name: Tests (without MCP)
run: cargo test --workspace --no-default-features
# 6. Vertragsbeweis separat (mit Output für Logs)
- name: Contract Proof
run: cargo test --test vertragsbeweis -- --nocapture
# 7. Doc-Tests
- name: Doc tests
run: cargo doc --workspace --no-deps
# Separater Job: MSRV-Check
msrv:
name: MSRV (1.85)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.85"
- run: cargo check --workspace --no-default-features
# Separater Job: Security Audit
audit:
name: Security Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: rustsec/audit-check@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Separater Job: Publish Dry-Run
publish-check:
name: Publish Dry-Run
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo publish -p germanic-macros --dry-run
- run: cargo publish -p germanic --dry-run