Skip to repository content981 lines · 38.6 KB · yaml
tenant.openagents/omega
No repository description is available.
OpenAgents Git authority 2026-07-28T00:31:12.039Z Public web read
NIP-34 coordinate
30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omegaMaintainersHidden in public view
References2 branches · 1 tag
Read-only clone
git clone https://openagents.com/git/tenant.openagents/omega.gitBrowse files
run_tests.yml
1# Generated from xtask::workflows::run_tests
2# Rebuild with `cargo xtask workflows`.
3name: run_tests
4env:
5 CARGO_TERM_COLOR: always
6 RUST_BACKTRACE: '1'
7 CARGO_INCREMENTAL: '0'
8on:
9 merge_group: {}
10 pull_request:
11 branches:
12 - '**'
13 push:
14 branches:
15 - main
16 - v[0-9]+.[0-9]+.x
17permissions:
18 contents: read
19jobs:
20 orchestrate:
21 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
22 runs-on: namespace-profile-2x4-ubuntu-2404
23 steps:
24 - name: steps::harden_runner
25 uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411
26 with:
27 egress-policy: audit
28 - name: steps::checkout_repo
29 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
30 with:
31 clean: false
32 fetch-depth: ${{ github.ref == 'refs/heads/main' && 2 || 350 }}
33 - id: filter
34 name: filter
35 run: |
36 set -euo pipefail
37 if [ -z "$GITHUB_BASE_REF" ]; then
38 echo "Not in a PR context (i.e., push to main/stable/preview)"
39 COMPARE_REV="$(git rev-parse HEAD~1)"
40 else
41 echo "In a PR context comparing to pull_request.base.ref"
42 git fetch origin "$GITHUB_BASE_REF" --depth=350
43 COMPARE_REV="$(git merge-base "origin/${GITHUB_BASE_REF}" HEAD)"
44 fi
45 CHANGED_FILES="$(git diff --name-only "$COMPARE_REV" "$GITHUB_SHA")"
46
47 check_pattern() {
48 local output_name="$1"
49 local pattern="$2"
50 local grep_arg="$3"
51
52 echo "$CHANGED_FILES" | grep "$grep_arg" "$pattern" && \
53 echo "${output_name}=true" >> "$GITHUB_OUTPUT" || \
54 echo "${output_name}=false" >> "$GITHUB_OUTPUT"
55 }
56
57 # Check for changes that require full rebuild (no filter)
58 # Direct pushes to main/stable/preview always run full suite
59 if [ -z "$GITHUB_BASE_REF" ]; then
60 echo "Not a PR, running full test suite"
61 echo "changed_packages=" >> "$GITHUB_OUTPUT"
62 elif echo "$CHANGED_FILES" | grep -qP '^(rust-toolchain\.toml|\.cargo/|\.github/|Cargo\.(toml|lock)$)'; then
63 echo "Toolchain, cargo config, or root Cargo files changed, will run all tests"
64 echo "changed_packages=" >> "$GITHUB_OUTPUT"
65 else
66 # Extract changed directories from file paths
67 CHANGED_DIRS=$(echo "$CHANGED_FILES" | \
68 grep -oP '^(crates|tooling)/\K[^/]+' | \
69 sort -u || true)
70
71 # Build directory-to-package mapping using cargo metadata
72 DIR_TO_PKG=$(cargo metadata --format-version=1 --no-deps 2>/dev/null | \
73 jq -r '.packages[] | select(.manifest_path | test("crates/|tooling/")) | "\(.manifest_path | capture("(crates|tooling)/(?<dir>[^/]+)") | .dir)=\(.name)"')
74
75 # Map directory names to package names
76 FILE_CHANGED_PKGS=""
77 for dir in $CHANGED_DIRS; do
78 pkg=$(echo "$DIR_TO_PKG" | grep "^${dir}=" | cut -d= -f2 | head -1 || true)
79 # Only add directories that map to a real root-workspace package.
80 # Some directories (e.g. tooling/lints) belong to a separate workspace
81 # and are not root members, so they have no mapping here. Previously we
82 # fell back to the raw directory name, which fabricated a bogus package
83 # (e.g. "lints") and produced a nextest filter like rdeps(lints) that
84 # hard-errors ("operator didn't match any packages"). Skipping such
85 # directories leaves the package set empty, which falls through to the
86 # "run all tests" path below.
87 if [ -n "$pkg" ]; then
88 FILE_CHANGED_PKGS=$(printf '%s\n%s' "$FILE_CHANGED_PKGS" "$pkg")
89 fi
90 done
91 FILE_CHANGED_PKGS=$(echo "$FILE_CHANGED_PKGS" | grep -v '^$' | sort -u || true)
92
93 # If assets/ changed, add crates that depend on those assets
94 if echo "$CHANGED_FILES" | grep -qP '^assets/'; then
95 FILE_CHANGED_PKGS=$(printf '%s\n%s\n%s' "$FILE_CHANGED_PKGS" "settings" "assets" | sort -u)
96 fi
97
98 # Combine all changed packages
99 ALL_CHANGED_PKGS=$(echo "$FILE_CHANGED_PKGS" | grep -v '^$' || true)
100
101 if [ -z "$ALL_CHANGED_PKGS" ]; then
102 echo "No package changes detected, will run all tests"
103 echo "changed_packages=" >> "$GITHUB_OUTPUT"
104 else
105 # Build nextest filterset with rdeps for each package
106 FILTERSET=$(echo "$ALL_CHANGED_PKGS" | \
107 sed 's/.*/rdeps(&)/' | \
108 tr '\n' '|' | \
109 sed 's/|$//')
110 echo "Changed packages filterset: $FILTERSET"
111 echo "changed_packages=$FILTERSET" >> "$GITHUB_OUTPUT"
112 fi
113 fi
114
115 check_pattern "run_action_checks" '^\.github/(workflows/|actions/|actionlint.yml)|tooling/xtask|script/' -qP
116 check_pattern "run_docs" '^(docs/|crates/.*\.rs)' -qP
117 check_pattern "run_licenses" '^(Cargo.lock|script/.*licenses)' -qP
118 check_pattern "run_tests" '^(docs/|script/update_top_ranking_issues/|\.github/(ISSUE_TEMPLATE|workflows/(?!run_tests))|extensions/)' -qvP
119 # Detect changed extension directories (excluding extensions/workflows)
120 CHANGED_EXTENSIONS=$(echo "$CHANGED_FILES" | grep -oP '^extensions/[^/]+(?=/)' | sort -u | grep -v '^extensions/workflows$' || true)
121 # Filter out deleted extensions
122 EXISTING_EXTENSIONS=""
123 for ext in $CHANGED_EXTENSIONS; do
124 if [ -f "$ext/extension.toml" ]; then
125 EXISTING_EXTENSIONS=$(printf '%s\n%s' "$EXISTING_EXTENSIONS" "$ext")
126 fi
127 done
128 CHANGED_EXTENSIONS=$(echo "$EXISTING_EXTENSIONS" | sed '/^$/d')
129 if [ -n "$CHANGED_EXTENSIONS" ]; then
130 EXTENSIONS_JSON=$(echo "$CHANGED_EXTENSIONS" | jq -R -s -c 'split("\n") | map(select(length > 0))')
131 else
132 EXTENSIONS_JSON="[]"
133 fi
134 echo "changed_extensions=$EXTENSIONS_JSON" >> "$GITHUB_OUTPUT"
135 outputs:
136 changed_packages: ${{ steps.filter.outputs.changed_packages }}
137 run_action_checks: ${{ steps.filter.outputs.run_action_checks }}
138 run_docs: ${{ steps.filter.outputs.run_docs }}
139 run_licenses: ${{ steps.filter.outputs.run_licenses }}
140 run_tests: ${{ steps.filter.outputs.run_tests }}
141 changed_extensions: ${{ steps.filter.outputs.changed_extensions }}
142 check_style:
143 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
144 runs-on: namespace-profile-4x8-ubuntu-2204
145 steps:
146 - name: steps::harden_runner
147 uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411
148 with:
149 egress-policy: audit
150 - name: steps::checkout_repo
151 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
152 with:
153 clean: false
154 - name: steps::cache_rust_dependencies_namespace
155 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
156 with:
157 cache: rust
158 path: ~/.rustup
159 - name: steps::setup_pnpm
160 uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320
161 with:
162 version: '9'
163 - name: steps::prettier
164 run: ./script/prettier
165 - name: steps::cargo_fmt
166 run: cargo fmt --all -- --check
167 - name: ./script/check-todos
168 run: ./script/check-todos
169 - name: ./script/check-keymaps
170 run: ./script/check-keymaps
171 - name: run_tests::check_style::check_for_typos
172 uses: crate-ci/typos@2d0ce569feab1f8752f1dde43cc2f2aa53236e06
173 with:
174 config: ./typos.toml
175 - name: run_tests::fetch_ts_query_ls
176 uses: dsaltares/fetch-gh-release-asset@aa37ae5c44d3c9820bc12fe675e8670ecd93bd1c
177 with:
178 repo: ribru17/ts_query_ls
179 version: tags/v3.15.1
180 file: ts_query_ls-x86_64-unknown-linux-gnu.tar.gz
181 - name: run_tests::run_ts_query_ls
182 run: |-
183 tar -xf "$GITHUB_WORKSPACE/ts_query_ls-x86_64-unknown-linux-gnu.tar.gz" -C "$GITHUB_WORKSPACE"
184 "$GITHUB_WORKSPACE/ts_query_ls" format --check . || {
185 echo "Found unformatted queries, please format them with ts_query_ls."
186 echo "For easy use, install the Tree-sitter query extension:"
187 echo "zed://extension/tree-sitter-query"
188 false
189 }
190 timeout-minutes: 60
191 clippy_windows:
192 needs:
193 - orchestrate
194 if: needs.orchestrate.outputs.run_tests == 'true' && github.event_name != 'merge_group'
195 runs-on: self-32vcpu-windows-2022
196 steps:
197 - name: steps::checkout_repo
198 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
199 with:
200 clean: false
201 - name: steps::setup_cargo_config
202 run: |
203 New-Item -ItemType Directory -Path "./../.cargo" -Force
204 Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
205 shell: pwsh
206 - name: steps::setup_sccache
207 run: ./script/setup-sccache.ps1
208 shell: pwsh
209 env:
210 R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
211 R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
212 R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
213 SCCACHE_BUCKET: sccache-zed
214 - name: steps::clippy
215 run: ./script/clippy.ps1
216 shell: pwsh
217 - name: steps::show_sccache_stats
218 run: if ($env:RUSTC_WRAPPER) { & $env:RUSTC_WRAPPER --show-stats }; exit 0
219 shell: pwsh
220 timeout-minutes: 60
221 clippy_linux:
222 needs:
223 - orchestrate
224 if: needs.orchestrate.outputs.run_tests == 'true'
225 runs-on: namespace-profile-16x32-ubuntu-2204
226 env:
227 CC: clang
228 CXX: clang++
229 steps:
230 - name: steps::harden_runner
231 uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411
232 with:
233 egress-policy: audit
234 - name: steps::checkout_repo
235 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
236 with:
237 clean: false
238 - name: steps::setup_cargo_config
239 run: |
240 mkdir -p ./../.cargo
241 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
242 - name: steps::cache_rust_dependencies_namespace
243 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
244 with:
245 cache: rust
246 path: ~/.rustup
247 - name: steps::setup_linux
248 run: ./script/linux
249 - name: steps::download_wasi_sdk
250 run: ./script/download-wasi-sdk
251 - name: steps::setup_sccache
252 run: ./script/setup-sccache
253 env:
254 R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
255 R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
256 R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
257 SCCACHE_BUCKET: sccache-zed
258 - name: steps::clippy
259 run: ./script/clippy
260 - name: steps::show_sccache_stats
261 run: sccache --show-stats || true
262 timeout-minutes: 60
263 clippy_mac:
264 needs:
265 - orchestrate
266 if: needs.orchestrate.outputs.run_tests == 'true' && github.event_name != 'merge_group'
267 runs-on: namespace-profile-mac-large
268 steps:
269 - name: steps::checkout_repo
270 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
271 with:
272 clean: false
273 - name: steps::setup_cargo_config
274 run: |
275 mkdir -p ./../.cargo
276 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
277 - name: steps::cache_rust_dependencies_namespace
278 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
279 with:
280 cache: rust
281 path: ~/.rustup
282 - name: steps::setup_sccache
283 run: ./script/setup-sccache
284 env:
285 R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
286 R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
287 R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
288 SCCACHE_BUCKET: sccache-zed
289 - name: steps::clippy
290 run: ./script/clippy
291 - name: steps::show_sccache_stats
292 run: sccache --show-stats || true
293 timeout-minutes: 60
294 clippy_mac_x86_64:
295 needs:
296 - orchestrate
297 if: needs.orchestrate.outputs.run_tests == 'true' && github.event_name != 'merge_group'
298 runs-on: namespace-profile-mac-large
299 steps:
300 - name: steps::checkout_repo
301 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
302 with:
303 clean: false
304 - name: steps::setup_cargo_config
305 run: |
306 mkdir -p ./../.cargo
307 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
308 - name: steps::cache_rust_dependencies_namespace
309 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
310 with:
311 cache: rust
312 path: ~/.rustup
313 - name: steps::install_rustup_target
314 run: rustup target add x86_64-apple-darwin
315 - name: steps::setup_sccache
316 run: ./script/setup-sccache
317 env:
318 R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
319 R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
320 R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
321 SCCACHE_BUCKET: sccache-zed
322 - name: steps::clippy
323 run: ./script/clippy --target x86_64-apple-darwin
324 - name: steps::show_sccache_stats
325 run: sccache --show-stats || true
326 timeout-minutes: 60
327 run_tests_windows:
328 needs:
329 - orchestrate
330 if: needs.orchestrate.outputs.run_tests == 'true' && github.event_name != 'merge_group'
331 runs-on: self-32vcpu-windows-2022
332 steps:
333 - name: steps::checkout_repo
334 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
335 with:
336 clean: false
337 - name: steps::setup_cargo_config
338 run: |
339 New-Item -ItemType Directory -Path "./../.cargo" -Force
340 Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
341 shell: pwsh
342 - name: steps::setup_node
343 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
344 with:
345 node-version: '24'
346 check-latest: true
347 package-manager-cache: false
348 - name: steps::clear_target_dir_if_large
349 run: ./script/clear-target-dir-if-larger-than.ps1 350 200
350 shell: pwsh
351 - name: steps::setup_sccache
352 run: ./script/setup-sccache.ps1
353 shell: pwsh
354 env:
355 R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
356 R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
357 R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
358 SCCACHE_BUCKET: sccache-zed
359 - name: steps::cargo_nextest
360 run: cargo nextest run --workspace --no-fail-fast --no-tests=warn${{ needs.orchestrate.outputs.changed_packages && format(' -E "{0}"', needs.orchestrate.outputs.changed_packages) || '' }}
361 shell: pwsh
362 - name: steps::show_sccache_stats
363 run: if ($env:RUSTC_WRAPPER) { & $env:RUSTC_WRAPPER --show-stats }; exit 0
364 shell: pwsh
365 - name: steps::cleanup_cargo_config
366 if: always()
367 run: |
368 Remove-Item -Recurse -Path "./../.cargo" -Force -ErrorAction SilentlyContinue
369 shell: pwsh
370 timeout-minutes: 60
371 run_tests_linux:
372 needs:
373 - orchestrate
374 if: needs.orchestrate.outputs.run_tests == 'true' && github.event_name != 'merge_group'
375 runs-on: namespace-profile-16x32-ubuntu-2204
376 env:
377 CC: clang
378 CXX: clang++
379 steps:
380 - name: steps::harden_runner
381 uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411
382 with:
383 egress-policy: audit
384 - name: steps::checkout_repo
385 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
386 with:
387 clean: false
388 - name: steps::setup_cargo_config
389 run: |
390 mkdir -p ./../.cargo
391 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
392 - name: steps::cache_rust_dependencies_namespace
393 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
394 with:
395 cache: rust
396 path: ~/.rustup
397 - name: steps::setup_linux
398 run: ./script/linux
399 - name: steps::download_wasi_sdk
400 run: ./script/download-wasi-sdk
401 - name: steps::setup_node
402 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
403 with:
404 node-version: '24'
405 check-latest: true
406 package-manager-cache: false
407 - name: steps::cargo_install_nextest
408 uses: taiki-e/install-action@a6b2e2dcd845ddd7f509ce4f3ed3d922b80cc5d9
409 with:
410 tool: nextest
411 - name: steps::clear_target_dir_if_large
412 run: ./script/clear-target-dir-if-larger-than 350 200
413 - name: steps::setup_sccache
414 run: ./script/setup-sccache
415 env:
416 R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
417 R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
418 R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
419 SCCACHE_BUCKET: sccache-zed
420 - name: steps::cargo_nextest
421 run: cargo nextest run --workspace --no-fail-fast --no-tests=warn${{ needs.orchestrate.outputs.changed_packages && format(' -E "{0}"', needs.orchestrate.outputs.changed_packages) || '' }}
422 - name: steps::show_sccache_stats
423 run: sccache --show-stats || true
424 - name: steps::cleanup_cargo_config
425 if: always()
426 run: |
427 rm -rf ./../.cargo
428 timeout-minutes: 60
429 services:
430 postgres:
431 image: postgres:15@sha256:1b92e7a80c021647bf70f5d3eb66066a998e4f5cf43c07bb9dc9f729782cf88e
432 env:
433 POSTGRES_HOST_AUTH_METHOD: trust
434 ports:
435 - 5432:5432
436 options: --health-cmd pg_isready --health-interval 500ms --health-timeout 5s --health-retries 10
437 run_tests_mac:
438 needs:
439 - orchestrate
440 if: needs.orchestrate.outputs.run_tests == 'true' && github.event_name != 'merge_group'
441 runs-on: namespace-profile-mac-large
442 steps:
443 - name: steps::checkout_repo
444 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
445 with:
446 clean: false
447 - name: steps::setup_cargo_config
448 run: |
449 mkdir -p ./../.cargo
450 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
451 - name: steps::cache_rust_dependencies_namespace
452 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
453 with:
454 cache: rust
455 path: ~/.rustup
456 - name: steps::setup_node
457 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
458 with:
459 node-version: '24'
460 check-latest: true
461 package-manager-cache: false
462 - name: steps::cargo_install_nextest
463 uses: taiki-e/install-action@a6b2e2dcd845ddd7f509ce4f3ed3d922b80cc5d9
464 with:
465 tool: nextest
466 - name: steps::clear_target_dir_if_large
467 run: ./script/clear-target-dir-if-larger-than 350 200
468 - name: steps::setup_sccache
469 run: ./script/setup-sccache
470 env:
471 R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
472 R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
473 R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
474 SCCACHE_BUCKET: sccache-zed
475 - name: steps::cargo_nextest
476 run: cargo nextest run --workspace --no-fail-fast --no-tests=warn${{ needs.orchestrate.outputs.changed_packages && format(' -E "{0}"', needs.orchestrate.outputs.changed_packages) || '' }}
477 - name: steps::show_sccache_stats
478 run: sccache --show-stats || true
479 - name: steps::cleanup_cargo_config
480 if: always()
481 run: |
482 rm -rf ./../.cargo
483 timeout-minutes: 60
484 miri_scheduler:
485 needs:
486 - orchestrate
487 if: needs.orchestrate.outputs.run_tests == 'true' && github.event_name != 'merge_group'
488 runs-on: namespace-profile-16x32-ubuntu-2204
489 steps:
490 - name: steps::harden_runner
491 uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411
492 with:
493 egress-policy: audit
494 - name: steps::checkout_repo
495 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
496 with:
497 clean: false
498 - name: steps::setup_cargo_config
499 run: |
500 mkdir -p ./../.cargo
501 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
502 - name: steps::cache_rust_dependencies_namespace
503 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
504 with:
505 cache: rust
506 path: ~/.rustup
507 - name: run_tests::miri_scheduler::install_miri
508 run: rustup toolchain install nightly --profile minimal --component miri --component rust-src
509 - name: run_tests::miri_scheduler::run_scheduler_tests_under_miri
510 run: cargo +nightly -q miri test -p scheduler
511 - name: steps::cleanup_cargo_config
512 if: always()
513 run: |
514 rm -rf ./../.cargo
515 timeout-minutes: 60
516 doctests:
517 needs:
518 - orchestrate
519 if: needs.orchestrate.outputs.run_tests == 'true' && github.event_name != 'merge_group'
520 runs-on: namespace-profile-16x32-ubuntu-2204
521 env:
522 CC: clang
523 CXX: clang++
524 steps:
525 - name: steps::harden_runner
526 uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411
527 with:
528 egress-policy: audit
529 - name: steps::checkout_repo
530 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
531 with:
532 clean: false
533 - name: steps::cache_rust_dependencies_namespace
534 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
535 with:
536 cache: rust
537 path: ~/.rustup
538 - name: steps::setup_linux
539 run: ./script/linux
540 - name: steps::download_wasi_sdk
541 run: ./script/download-wasi-sdk
542 - name: steps::setup_cargo_config
543 run: |
544 mkdir -p ./../.cargo
545 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
546 - name: steps::setup_sccache
547 run: ./script/setup-sccache
548 env:
549 R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
550 R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
551 R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
552 SCCACHE_BUCKET: sccache-zed
553 - id: run_doctests
554 name: run_tests::doctests::run_doctests
555 run: |
556 cargo test --workspace --doc --no-fail-fast
557 - name: steps::show_sccache_stats
558 run: sccache --show-stats || true
559 - name: steps::cleanup_cargo_config
560 if: always()
561 run: |
562 rm -rf ./../.cargo
563 timeout-minutes: 60
564 check_workspace_binaries:
565 needs:
566 - orchestrate
567 if: needs.orchestrate.outputs.run_tests == 'true' && github.event_name != 'merge_group'
568 runs-on: namespace-profile-8x16-ubuntu-2204
569 env:
570 CC: clang
571 CXX: clang++
572 steps:
573 - name: steps::harden_runner
574 uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411
575 with:
576 egress-policy: audit
577 - name: steps::checkout_repo
578 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
579 with:
580 clean: false
581 - name: steps::setup_cargo_config
582 run: |
583 mkdir -p ./../.cargo
584 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
585 - name: steps::cache_rust_dependencies_namespace
586 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
587 with:
588 cache: rust
589 path: ~/.rustup
590 - name: steps::setup_linux
591 run: ./script/linux
592 - name: steps::download_wasi_sdk
593 run: ./script/download-wasi-sdk
594 - name: steps::setup_sccache
595 run: ./script/setup-sccache
596 env:
597 R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
598 R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
599 R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
600 SCCACHE_BUCKET: sccache-zed
601 - name: cargo build -p collab
602 run: cargo build -p collab
603 - name: cargo build --workspace --bins --examples
604 run: cargo build --workspace --bins --examples
605 - name: steps::show_sccache_stats
606 run: sccache --show-stats || true
607 - name: steps::cleanup_cargo_config
608 if: always()
609 run: |
610 rm -rf ./../.cargo
611 timeout-minutes: 60
612 build_visual_tests_binary:
613 needs:
614 - orchestrate
615 if: needs.orchestrate.outputs.run_tests == 'true' && github.event_name != 'merge_group'
616 runs-on: namespace-profile-mac-large
617 steps:
618 - name: steps::checkout_repo
619 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
620 with:
621 clean: false
622 - name: steps::setup_cargo_config
623 run: |
624 mkdir -p ./../.cargo
625 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
626 - name: steps::cache_rust_dependencies_namespace
627 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
628 with:
629 cache: rust
630 path: ~/.rustup
631 - name: run_tests::build_visual_tests_binary::cargo_build_visual_tests
632 run: cargo build -p zed --bin zed_visual_test_runner --features visual-tests
633 - name: steps::cleanup_cargo_config
634 if: always()
635 run: |
636 rm -rf ./../.cargo
637 check_wasm:
638 needs:
639 - orchestrate
640 if: needs.orchestrate.outputs.run_tests == 'true' && github.event_name != 'merge_group'
641 runs-on: namespace-profile-8x16-ubuntu-2204
642 steps:
643 - name: steps::harden_runner
644 uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411
645 with:
646 egress-policy: audit
647 - name: steps::checkout_repo
648 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
649 with:
650 clean: false
651 - name: steps::setup_cargo_config
652 run: |
653 mkdir -p ./../.cargo
654 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
655 - name: steps::cache_rust_dependencies_namespace
656 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
657 with:
658 cache: rust
659 path: ~/.rustup
660 - name: run_tests::check_wasm::install_nightly_wasm_toolchain
661 run: rustup toolchain install nightly --component rust-src --target wasm32-unknown-unknown
662 - name: steps::setup_sccache
663 run: ./script/setup-sccache
664 env:
665 R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
666 R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
667 R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
668 SCCACHE_BUCKET: sccache-zed
669 - name: run_tests::check_wasm::cargo_check_wasm
670 run: cargo -Zbuild-std=std,panic_abort check --target wasm32-unknown-unknown -p gpui_platform -p cloud_api_client
671 env:
672 CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUSTFLAGS: -C target-feature=+atomics,+bulk-memory,+mutable-globals
673 RUSTC_BOOTSTRAP: '1'
674 - name: steps::show_sccache_stats
675 run: sccache --show-stats || true
676 - name: steps::cleanup_cargo_config
677 if: always()
678 run: |
679 rm -rf ./../.cargo
680 timeout-minutes: 60
681 check_dependencies:
682 needs:
683 - orchestrate
684 if: needs.orchestrate.outputs.run_tests == 'true' && github.event_name != 'merge_group'
685 runs-on: namespace-profile-2x4-ubuntu-2404
686 env:
687 CC: clang
688 CXX: clang++
689 steps:
690 - name: steps::harden_runner
691 uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411
692 with:
693 egress-policy: audit
694 - name: steps::checkout_repo
695 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
696 with:
697 clean: false
698 - name: steps::cache_rust_dependencies_namespace
699 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
700 with:
701 cache: rust
702 path: ~/.rustup
703 - name: run_tests::check_dependencies::install_cargo_machete
704 uses: taiki-e/install-action@a6b2e2dcd845ddd7f509ce4f3ed3d922b80cc5d9
705 with:
706 tool: cargo-machete@0.7.0
707 - name: run_tests::check_dependencies::run_cargo_machete
708 run: cargo machete
709 - name: run_tests::check_dependencies::check_cargo_lock
710 run: cargo update --locked --workspace
711 - name: run_tests::check_dependencies::check_vulnerable_dependencies
712 if: github.event_name == 'pull_request'
713 uses: actions/dependency-review-action@67d4f4bd7a9b17a0db54d2a7519187c65e339de8
714 with:
715 license-check: false
716 timeout-minutes: 60
717 check_docs:
718 needs:
719 - orchestrate
720 if: needs.orchestrate.outputs.run_docs == 'true' && github.event_name != 'merge_group'
721 runs-on: namespace-profile-16x32-ubuntu-2204
722 env:
723 DOCS_AMPLITUDE_API_KEY: ${{ secrets.DOCS_AMPLITUDE_API_KEY }}
724 DOCS_CONSENT_IO_INSTANCE: ${{ secrets.DOCS_CONSENT_IO_INSTANCE }}
725 CC: clang
726 CXX: clang++
727 steps:
728 - name: steps::harden_runner
729 uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411
730 with:
731 egress-policy: audit
732 - name: steps::checkout_repo
733 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
734 with:
735 clean: false
736 - name: steps::setup_cargo_config
737 run: |
738 mkdir -p ./../.cargo
739 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
740 - name: steps::cache_rust_dependencies_namespace
741 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
742 with:
743 cache: rust
744 path: ~/.rustup
745 - name: steps::setup_linux
746 run: ./script/linux
747 - name: steps::download_wasi_sdk
748 run: ./script/download-wasi-sdk
749 - name: ./script/generate-action-metadata
750 run: ./script/generate-action-metadata
751 - name: deploy_docs::lychee_link_check
752 uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332
753 with:
754 args: --no-progress --exclude '^http' './docs/src/**/*'
755 fail: true
756 jobSummary: false
757 - name: deploy_docs::install_mdbook
758 uses: peaceiris/actions-mdbook@ee69d230fe19748b7abf22df32acaa93833fad08
759 with:
760 mdbook-version: 0.4.37
761 - name: deploy_docs::build_docs_book
762 run: |
763 mkdir -p target/deploy
764 mdbook build ./docs --dest-dir=../target/deploy/docs/
765 env:
766 DOCS_CHANNEL: stable
767 MDBOOK_BOOK__SITE_URL: /docs/
768 - name: deploy_docs::lychee_link_check
769 uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332
770 with:
771 args: --no-progress --exclude '^http' 'target/deploy/docs'
772 fail: true
773 jobSummary: false
774 timeout-minutes: 60
775 check_licenses:
776 needs:
777 - orchestrate
778 if: needs.orchestrate.outputs.run_licenses == 'true' && github.event_name != 'merge_group'
779 runs-on: namespace-profile-2x4-ubuntu-2404
780 steps:
781 - name: steps::harden_runner
782 uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411
783 with:
784 egress-policy: audit
785 - name: steps::checkout_repo
786 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
787 with:
788 clean: false
789 - name: steps::cache_rust_dependencies_namespace
790 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
791 with:
792 cache: rust
793 path: ~/.rustup
794 - name: ./script/check-licenses
795 run: ./script/check-licenses
796 - name: ./script/generate-licenses
797 run: ./script/generate-licenses
798 check_scripts:
799 needs:
800 - orchestrate
801 if: needs.orchestrate.outputs.run_action_checks == 'true'
802 runs-on: namespace-profile-8x16-ubuntu-2204
803 steps:
804 - name: steps::harden_runner
805 uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411
806 with:
807 egress-policy: audit
808 - name: steps::checkout_repo
809 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
810 with:
811 clean: false
812 - name: run_tests::check_scripts::run_shellcheck
813 run: ./script/shellcheck-scripts error
814 - name: steps::cache_rust_dependencies_namespace
815 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
816 with:
817 cache: rust
818 path: ~/.rustup
819 - name: run_tests::check_scripts::check_xtask_workflows
820 run: |
821 cargo xtask workflows
822 if ! git diff --exit-code .github; then
823 echo "Error: .github directory has uncommitted changes after running 'cargo xtask workflows'"
824 echo "Please run 'cargo xtask workflows' locally and commit the changes"
825 exit 1
826 fi
827 - id: get_actionlint
828 name: run_tests::check_scripts::download_actionlint
829 run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
830 - name: run_tests::check_scripts::run_actionlint
831 run: '"$ACTIONLINT_BIN" -color'
832 env:
833 ACTIONLINT_BIN: ${{ steps.get_actionlint.outputs.executable }}
834 - name: run_tests::check_scripts::run_zizmor
835 uses: zizmorcore/zizmor-action@6599ee8b7a49aef6a770f63d261d214911a7ce02
836 with:
837 advanced-security: false
838 min-severity: high
839 version: latest
840 timeout-minutes: 60
841 check_postgres_and_protobuf_migrations:
842 needs:
843 - orchestrate
844 if: needs.orchestrate.outputs.run_tests == 'true'
845 runs-on: namespace-profile-16x32-ubuntu-2204
846 env:
847 GIT_AUTHOR_NAME: Protobuf Action
848 GIT_AUTHOR_EMAIL: ci@zed.dev
849 GIT_COMMITTER_NAME: Protobuf Action
850 GIT_COMMITTER_EMAIL: ci@zed.dev
851 steps:
852 - name: steps::harden_runner
853 uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411
854 with:
855 egress-policy: audit
856 - name: steps::checkout_repo
857 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
858 with:
859 clean: false
860 fetch-depth: 0
861 - name: run_tests::check_postgres_and_protobuf_migrations::ensure_fresh_merge
862 run: |
863 if [ -z "$GITHUB_BASE_REF" ];
864 then
865 echo "BUF_BASE_BRANCH=$(git merge-base origin/main HEAD)" >> "$GITHUB_ENV"
866 else
867 git checkout -B temp
868 git merge -q "origin/$GITHUB_BASE_REF" -m "merge main into temp"
869 echo "BUF_BASE_BRANCH=$GITHUB_BASE_REF" >> "$GITHUB_ENV"
870 fi
871 - name: run_tests::check_postgres_and_protobuf_migrations::bufbuild_setup_action
872 uses: bufbuild/buf-setup-action@a47c93e0b1648d5651a065437926377d060baa99
873 with:
874 version: v1.29.0
875 github_token: ${{ secrets.GITHUB_TOKEN }}
876 - name: run_tests::check_postgres_and_protobuf_migrations::bufbuild_breaking_action
877 uses: bufbuild/buf-breaking-action@c57b3d842a5c3f3b454756ef65305a50a587c5ba
878 with:
879 input: crates/proto/proto/
880 against: https://github.com/${GITHUB_REPOSITORY}.git#branch=${BUF_BASE_BRANCH},subdir=crates/proto/proto/
881 - name: run_tests::check_postgres_and_protobuf_migrations::buf_lint
882 run: buf lint crates/proto/proto
883 - name: run_tests::check_postgres_and_protobuf_migrations::check_protobuf_formatting
884 run: buf format --diff --exit-code crates/proto/proto
885 timeout-minutes: 60
886 extension_tests:
887 needs:
888 - orchestrate
889 if: needs.orchestrate.outputs.changed_extensions != '[]'
890 permissions:
891 contents: read
892 strategy:
893 matrix:
894 extension: ${{ fromJson(needs.orchestrate.outputs.changed_extensions) }}
895 fail-fast: false
896 max-parallel: 1
897 uses: ./.github/workflows/extension_tests.yml
898 with:
899 working-directory: ${{ matrix.extension }}
900 tests_pass:
901 needs:
902 - orchestrate
903 - check_style
904 - clippy_windows
905 - clippy_linux
906 - clippy_mac
907 - clippy_mac_x86_64
908 - run_tests_windows
909 - run_tests_linux
910 - run_tests_mac
911 - miri_scheduler
912 - doctests
913 - check_workspace_binaries
914 - build_visual_tests_binary
915 - check_wasm
916 - check_dependencies
917 - check_docs
918 - check_licenses
919 - check_scripts
920 - extension_tests
921 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions') && always()
922 runs-on: namespace-profile-2x4-ubuntu-2404
923 steps:
924 - name: run_tests::tests_pass
925 run: |
926 set +x
927 EXIT_CODE=0
928
929 check_result() {
930 echo "* $1: $2"
931 if [[ "$2" != "skipped" && "$2" != "success" ]]; then EXIT_CODE=1; fi
932 }
933
934 check_result "orchestrate" "$RESULT_ORCHESTRATE"
935 check_result "check_style" "$RESULT_CHECK_STYLE"
936 check_result "clippy_windows" "$RESULT_CLIPPY_WINDOWS"
937 check_result "clippy_linux" "$RESULT_CLIPPY_LINUX"
938 check_result "clippy_mac" "$RESULT_CLIPPY_MAC"
939 check_result "clippy_mac_x86_64" "$RESULT_CLIPPY_MAC_X86_64"
940 check_result "run_tests_windows" "$RESULT_RUN_TESTS_WINDOWS"
941 check_result "run_tests_linux" "$RESULT_RUN_TESTS_LINUX"
942 check_result "run_tests_mac" "$RESULT_RUN_TESTS_MAC"
943 check_result "miri_scheduler" "$RESULT_MIRI_SCHEDULER"
944 check_result "doctests" "$RESULT_DOCTESTS"
945 check_result "check_workspace_binaries" "$RESULT_CHECK_WORKSPACE_BINARIES"
946 check_result "build_visual_tests_binary" "$RESULT_BUILD_VISUAL_TESTS_BINARY"
947 check_result "check_wasm" "$RESULT_CHECK_WASM"
948 check_result "check_dependencies" "$RESULT_CHECK_DEPENDENCIES"
949 check_result "check_docs" "$RESULT_CHECK_DOCS"
950 check_result "check_licenses" "$RESULT_CHECK_LICENSES"
951 check_result "check_scripts" "$RESULT_CHECK_SCRIPTS"
952 check_result "extension_tests" "$RESULT_EXTENSION_TESTS"
953
954 exit $EXIT_CODE
955 env:
956 RESULT_ORCHESTRATE: ${{ needs.orchestrate.result }}
957 RESULT_CHECK_STYLE: ${{ needs.check_style.result }}
958 RESULT_CLIPPY_WINDOWS: ${{ needs.clippy_windows.result }}
959 RESULT_CLIPPY_LINUX: ${{ needs.clippy_linux.result }}
960 RESULT_CLIPPY_MAC: ${{ needs.clippy_mac.result }}
961 RESULT_CLIPPY_MAC_X86_64: ${{ needs.clippy_mac_x86_64.result }}
962 RESULT_RUN_TESTS_WINDOWS: ${{ needs.run_tests_windows.result }}
963 RESULT_RUN_TESTS_LINUX: ${{ needs.run_tests_linux.result }}
964 RESULT_RUN_TESTS_MAC: ${{ needs.run_tests_mac.result }}
965 RESULT_MIRI_SCHEDULER: ${{ needs.miri_scheduler.result }}
966 RESULT_DOCTESTS: ${{ needs.doctests.result }}
967 RESULT_CHECK_WORKSPACE_BINARIES: ${{ needs.check_workspace_binaries.result }}
968 RESULT_BUILD_VISUAL_TESTS_BINARY: ${{ needs.build_visual_tests_binary.result }}
969 RESULT_CHECK_WASM: ${{ needs.check_wasm.result }}
970 RESULT_CHECK_DEPENDENCIES: ${{ needs.check_dependencies.result }}
971 RESULT_CHECK_DOCS: ${{ needs.check_docs.result }}
972 RESULT_CHECK_LICENSES: ${{ needs.check_licenses.result }}
973 RESULT_CHECK_SCRIPTS: ${{ needs.check_scripts.result }}
974 RESULT_EXTENSION_TESTS: ${{ needs.extension_tests.result }}
975concurrency:
976 group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
977 cancel-in-progress: true
978defaults:
979 run:
980 shell: bash -euxo pipefail {0}
981