-
Notifications
You must be signed in to change notification settings - Fork 1
219 lines (208 loc) · 9.93 KB
/
Copy pathci.yml
File metadata and controls
219 lines (208 loc) · 9.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
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
name: CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
# The companions job relinks every graphql-orm-ai test binary once per provider
# feature combination. With full debug info that exhausted the runner disk and
# the linker died with SIGBUS mid-link. `line-tables-only` keeps file and line
# numbers in failure backtraces, which is what CI diagnosis actually needs,
# at a fraction of the size.
env:
CARGO_PROFILE_DEV_DEBUG: line-tables-only
CARGO_PROFILE_TEST_DEBUG: line-tables-only
CARGO_INCREMENTAL: "0"
jobs:
workspace-integrity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: Check documentation governance
run: python3 scripts/check-documentation.py --base "${{ github.event.pull_request.base.sha }}"
- name: Check generated workspace inventory
run: python3 scripts/generate-workspace-inventory.py --check
- name: Check Git-only release metadata
run: |
python3 scripts/check-release-state.py
scripts/check-release-manifest.sh
python3 scripts/test-router-notices.py
- name: Check PR documentation impact
if: github.event_name == 'pull_request'
env:
PR_BODY: ${{ github.event.pull_request.body }}
run: python3 scripts/check-pr-documentation-impact.py
- run: cargo fmt --all -- --check
- run: scripts/check-workspace-dependencies.sh
- run: cargo test -p graphql-orm-storage
- run: cargo test -p graphql-orm-backup --features orm-sqlite
- run: cargo test -p graphql-orm-operation-catalog -p graphql-orm-ai-tool-profiles
orm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo test -p graphql-orm
- run: cargo check -p graphql-orm --no-default-features --features postgres
- run: cargo check -p graphql-orm --no-default-features --features mssql
- run: cargo clippy -p graphql-orm --all-targets -- -D warnings
- run: RUSTDOCFLAGS="-D warnings" cargo doc -p graphql-orm -p graphql-orm-macros --no-deps
companions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: scripts/check-ai-provider-lanes.sh test
- run: cargo test -p graphql-orm-ai --features graphql-case-pascal --test graphql_naming
- run: cargo clippy -p graphql-orm-ai --all-targets --features provider-openai,provider-anthropic,provider-xai,provider-ollama,provider-openai-compatible,local-harness -- -D warnings
- run: cargo clippy -p graphql-orm-operation-catalog -p graphql-orm-ai-tool-profiles --all-targets -- -D warnings
- run: RUSTDOCFLAGS="-D warnings -D missing_docs" cargo doc -p graphql-orm-ai -p graphql-orm-operation-catalog -p graphql-orm-ai-tool-profiles --features graphql-orm-ai/provider-openai,graphql-orm-ai/provider-anthropic,graphql-orm-ai/provider-xai,graphql-orm-ai/provider-ollama,graphql-orm-ai/provider-openai-compatible,graphql-orm-ai/local-harness --no-deps
router:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo test -p graphql-orm-router-protocol --locked
- run: cargo test -p graphql-orm-router --locked
- run: cargo test -p graphql-orm-router --locked --features auth-agql
- run: cargo clippy -p graphql-orm-router-protocol --all-targets --locked -- -D warnings
- run: cargo clippy -p graphql-orm-router --all-targets --locked -- -D warnings
- run: cargo clippy -p graphql-orm-router --all-targets --locked --features auth-agql -- -D warnings
- run: RUSTDOCFLAGS="-D warnings -D missing_docs" cargo doc -p graphql-orm-router-protocol --no-deps --locked
- run: RUSTDOCFLAGS="-D warnings" cargo doc -p graphql-orm-router --no-deps --locked
- run: RUSTDOCFLAGS="-D warnings -D missing_docs" cargo doc -p graphql-orm-router --no-deps --locked --features auth-agql
router-msrv:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.90.0
- uses: Swatinem/rust-cache@v2
- run: cargo test -p graphql-orm-router-protocol --locked
- run: cargo test -p graphql-orm-router --locked
package-release-policy:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- run: scripts/check-package-release-policy.sh "${{ github.event.pull_request.base.sha }}"
alternate-features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo check -p graphql-orm-ai --no-default-features --features postgres
- run: cargo check -p graphql-orm-ai --no-default-features --features mssql
- run: cargo check -p graphql-orm-ai -p graphql-orm --no-default-features --features graphql-orm-ai/sqlite,graphql-orm/mssql
- run: cargo check -p graphql-orm-backup --no-default-features --features local,orm-postgres
- run: cargo check -p graphql-orm-storage --no-default-features --features s3,azure
- run: cargo check -p graphql-orm-storage --no-default-features --features smb
ai-postgres-parity:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run ORM parity against a test-owned disposable PostgreSQL container
run: cargo test -p graphql-orm-ai --no-default-features --features postgres,provider-openai --test postgres_parity -- --test-threads=1
semver:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Create baseline worktree
run: git worktree add ../graphql-orm-baseline "${{ github.event.pull_request.base.sha }}"
- id: companion-baseline
name: Detect consolidated packages in the baseline
run: |
if git cat-file -e "${{ github.event.pull_request.base.sha }}:crates/graphql-orm-ai/Cargo.toml"; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
fi
- id: router-baseline
name: Detect router packages in the baseline
run: |
if git cat-file -e "${{ github.event.pull_request.base.sha }}:crates/graphql-orm-router/Cargo.toml"; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
fi
- uses: obi1kenobi/cargo-semver-checks-action@v2
with:
manifest-path: crates/graphql-orm/Cargo.toml
baseline-root: ../graphql-orm-baseline/crates/graphql-orm
feature-group: default-features
# graphql-orm-macros is deliberately absent. It is a proc-macro crate, so
# it exposes no library API surface for cargo-semver-checks to analyze;
# newer versions of the tool now fail the job outright rather than
# silently checking nothing. scripts/check-semver.sh has excluded it for
# the same reason. Macro compatibility is covered by the aligned
# package-version gate and the full compile/trybuild fixture matrix.
- if: steps.companion-baseline.outputs.exists == 'true'
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
manifest-path: crates/graphql-orm-operation-catalog/Cargo.toml
baseline-root: ../graphql-orm-baseline/crates/graphql-orm-operation-catalog
feature-group: default-features
- if: steps.companion-baseline.outputs.exists == 'true'
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
manifest-path: crates/graphql-orm-ai-tool-profiles/Cargo.toml
baseline-root: ../graphql-orm-baseline/crates/graphql-orm-ai-tool-profiles
feature-group: default-features
- if: steps.companion-baseline.outputs.exists == 'true'
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
manifest-path: crates/graphql-orm-storage/Cargo.toml
baseline-root: ../graphql-orm-baseline/crates/graphql-orm-storage
feature-group: default-features
- if: steps.companion-baseline.outputs.exists == 'true'
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
manifest-path: crates/graphql-orm-backup/Cargo.toml
baseline-root: ../graphql-orm-baseline/crates/graphql-orm-backup
feature-group: default-features
- if: steps.companion-baseline.outputs.exists == 'true'
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
manifest-path: crates/graphql-orm-ai/Cargo.toml
baseline-root: ../graphql-orm-baseline/crates/graphql-orm-ai
feature-group: default-features
- if: steps.router-baseline.outputs.exists == 'true'
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
manifest-path: crates/graphql-orm-router-protocol/Cargo.toml
baseline-root: ../graphql-orm-baseline/crates/graphql-orm-router-protocol
feature-group: default-features
- if: steps.router-baseline.outputs.exists == 'true'
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
manifest-path: crates/graphql-orm-router/Cargo.toml
baseline-root: ../graphql-orm-baseline/crates/graphql-orm-router
feature-group: default-features