-
Notifications
You must be signed in to change notification settings - Fork 2
161 lines (129 loc) · 4.49 KB
/
Copy pathintegration-tests.yml
File metadata and controls
161 lines (129 loc) · 4.49 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
name: Calciforge Integration Tests
on:
push:
branches: [main, master, 'feat/**', 'fix/**']
pull_request:
branches: [main, master]
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
test:
name: Integration Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Install Rust toolchain
run: |
rustup toolchain install stable --profile minimal
rustup default stable
- name: Cache cargo dependencies
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build project
run: cargo build --workspace --all-targets
- name: Run unit tests
run: cargo test --workspace --exclude loom-tests --lib --bins
- name: Run integration tests
run: cargo test --workspace --exclude loom-tests --tests -- --skip test_gateway_
env:
# Skip tests that require running services in CI
SKIP_LIVE_TESTS: 1
- name: Run artifact recipe mock E2E
run: python3 scripts/artifact-recipe-mock-e2e.py
env:
CALCIFORGE_BIN: target/debug/calciforge
docker-gateway-smoke:
name: Docker Gateway Smoke
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Run Docker smoke stack
run: bash scripts/manual-docker-test.sh
env:
CALCIFORGE_STAGING_ARTIFACT_DIR: staging-artifacts/docker-smoke
- name: Upload Docker smoke artifacts
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: docker-smoke-artifacts
path: staging-artifacts/docker-smoke
if-no-files-found: ignore
lint:
name: Lint and Format
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Install Rust toolchain
run: |
rustup toolchain install stable --profile minimal --component rustfmt --component clippy
rustup default stable
- name: Check formatting
run: cargo fmt -- --check
- name: Run clippy
run: cargo clippy --workspace --all-targets -- -D warnings
matrix-real-e2e:
name: Real Matrix E2E
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Install Rust toolchain
run: |
rustup toolchain install stable --profile minimal
rustup default stable
- name: Cache cargo dependencies
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-matrix-real-${{ hashFiles('**/Cargo.lock') }}
- name: Build Calciforge with Matrix channel
run: cargo build -p calciforge --features channel-matrix
- name: Run real Matrix homeserver E2E
run: python3 scripts/matrix-real-e2e.py
model-gateway-synthetic-e2e:
name: Model Gateway Synthetic E2E
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Install Rust toolchain
run: |
rustup toolchain install stable --profile minimal
rustup default stable
- name: Cache cargo dependencies
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-synthetic-gateway-${{ hashFiles('**/Cargo.lock') }}
- name: Build Calciforge
run: cargo build -p calciforge
- name: Run synthetic model gateway E2E
run: python3 scripts/model-gateway-synthetic-e2e.py