-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (92 loc) · 2.93 KB
/
Copy pathrust.yml
File metadata and controls
98 lines (92 loc) · 2.93 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
97
98
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
# Pin to actions/checkout v4.2.2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --locked --workspace --all-targets --all-features -- -D warnings
- name: Build
run: cargo build --locked --workspace --verbose
- name: Run tests
run: cargo test --locked --workspace --verbose
coverage:
runs-on: ubuntu-latest
steps:
# Pin to actions/checkout v4.2.2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Install LLVM coverage tools
run: |
rustup component add llvm-tools-preview
cargo install cargo-llvm-cov --version 0.8.7 --locked
- name: Enforce money-path line coverage
run: >-
cargo llvm-cov
--locked
--package altius-txguard
--package altius-signer
--package altius-payments
--all-features
--fail-under-lines 80
scan:
# altius scan SARIF gate (plugin-pack / CI surface). Scans a clean
# fixture so the job stays green; --fail-on-findings trips on High/Critical.
runs-on: ubuntu-latest
steps:
# Pin to actions/checkout v4.2.2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Build altius CLI
run: cargo build --locked -p altius-cli --release
- name: Scan fixture (SARIF)
run: |
mkdir -p testdata/scan-clean
./target/release/altius scan \
--path testdata/scan-clean \
--chain auto \
--format sarif \
--fail-on-findings \
> altius-scan.sarif
- name: Upload SARIF
if: always()
# Pin to actions/upload-artifact v4.6.0
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
with:
name: altius-scan-sarif
path: altius-scan.sarif
if-no-files-found: warn
neo4j:
# Feature-gated Neo4j path: compile the neo4j features and run the
# altius-memory integration test against a real service container.
runs-on: ubuntu-latest
services:
neo4j:
image: neo4j:5-community
ports:
- 7687:7687
- 7474:7474
env:
NEO4J_AUTH: neo4j/altius-dev
options: >-
--health-cmd "wget -qO- http://localhost:7474 || exit 1"
--health-interval 5s
--health-timeout 5s
--health-retries 20
env:
ALTIUS_NEO4J_URI: bolt://127.0.0.1:7687
ALTIUS_NEO4J_USER: neo4j
ALTIUS_NEO4J_PASSWORD: altius-dev
steps:
# Pin to actions/checkout v4.2.2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Run Neo4j integration tests
run: cargo test --locked -p altius-memory --features neo4j --verbose