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 pull_request:
10 branches:
11 - '**'
12 push:
13 branches:
14 - main
15 - v[0-9]+.[0-9]+.x
16jobs:
17 orchestrate:
18 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
19 runs-on: namespace-profile-2x4-ubuntu-2404
20 steps:
21 - name: steps::checkout_repo
22 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
23 with:
24 clean: false
25 fetch-depth: ${{ github.ref == 'refs/heads/main' && 2 || 350 }}
26 - id: filter
27 name: filter
28 run: |
29 if [ -z "$GITHUB_BASE_REF" ]; then
30 echo "Not in a PR context (i.e., push to main/stable/preview)"
31 COMPARE_REV="$(git rev-parse HEAD~1)"
32 else
33 echo "In a PR context comparing to pull_request.base.ref"
34 git fetch origin "$GITHUB_BASE_REF" --depth=350
35 COMPARE_REV="$(git merge-base "origin/${GITHUB_BASE_REF}" HEAD)"
36 fi
37 CHANGED_FILES="$(git diff --name-only "$COMPARE_REV" ${{ github.sha }})"
38
39 check_pattern() {
40 local output_name="$1"
41 local pattern="$2"
42 local grep_arg="$3"
43
44 echo "$CHANGED_FILES" | grep "$grep_arg" "$pattern" && \
45 echo "${output_name}=true" >> "$GITHUB_OUTPUT" || \
46 echo "${output_name}=false" >> "$GITHUB_OUTPUT"
47 }
48
49 check_pattern "run_action_checks" '^\.github/(workflows/|actions/|actionlint.yml)|tooling/xtask|script/' -qP
50 check_pattern "run_docs" '^(docs/|crates/.*\.rs)' -qP
51 check_pattern "run_licenses" '^(Cargo.lock|script/.*licenses)' -qP
52 check_pattern "run_nix" '^(nix/|flake\.|Cargo\.|rust-toolchain.toml|\.cargo/config.toml)' -qP
53 check_pattern "run_tests" '^(docs/|script/update_top_ranking_issues/|\.github/(ISSUE_TEMPLATE|workflows/(?!run_tests)))' -qvP
54 shell: bash -euxo pipefail {0}
55 outputs:
56 run_action_checks: ${{ steps.filter.outputs.run_action_checks }}
57 run_docs: ${{ steps.filter.outputs.run_docs }}
58 run_licenses: ${{ steps.filter.outputs.run_licenses }}
59 run_nix: ${{ steps.filter.outputs.run_nix }}
60 run_tests: ${{ steps.filter.outputs.run_tests }}
61 check_style:
62 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
63 runs-on: namespace-profile-4x8-ubuntu-2204
64 steps:
65 - name: steps::checkout_repo
66 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
67 with:
68 clean: false
69 - name: steps::cache_rust_dependencies_namespace
70 uses: namespacelabs/nscloud-cache-action@v1
71 with:
72 cache: rust
73 - name: steps::setup_pnpm
74 uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
75 with:
76 version: '9'
77 - name: steps::prettier
78 run: ./script/prettier
79 shell: bash -euxo pipefail {0}
80 - name: steps::cargo_fmt
81 run: cargo fmt --all -- --check
82 shell: bash -euxo pipefail {0}
83 - name: ./script/check-todos
84 run: ./script/check-todos
85 shell: bash -euxo pipefail {0}
86 - name: ./script/check-keymaps
87 run: ./script/check-keymaps
88 shell: bash -euxo pipefail {0}
89 - name: run_tests::check_style::check_for_typos
90 uses: crate-ci/typos@2d0ce569feab1f8752f1dde43cc2f2aa53236e06
91 with:
92 config: ./typos.toml
93 timeout-minutes: 60
94 clippy_windows:
95 needs:
96 - orchestrate
97 if: needs.orchestrate.outputs.run_tests == 'true'
98 runs-on: self-32vcpu-windows-2022
99 steps:
100 - name: steps::checkout_repo
101 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
102 with:
103 clean: false
104 - name: steps::setup_cargo_config
105 run: |
106 New-Item -ItemType Directory -Path "./../.cargo" -Force
107 Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
108 shell: pwsh
109 - name: steps::clippy
110 run: ./script/clippy.ps1
111 shell: pwsh
112 timeout-minutes: 60
113 clippy_linux:
114 needs:
115 - orchestrate
116 if: needs.orchestrate.outputs.run_tests == 'true'
117 runs-on: namespace-profile-16x32-ubuntu-2204
118 steps:
119 - name: steps::checkout_repo
120 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
121 with:
122 clean: false
123 - name: steps::setup_cargo_config
124 run: |
125 mkdir -p ./../.cargo
126 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
127 shell: bash -euxo pipefail {0}
128 - name: steps::cache_rust_dependencies_namespace
129 uses: namespacelabs/nscloud-cache-action@v1
130 with:
131 cache: rust
132 - name: steps::setup_linux
133 run: ./script/linux
134 shell: bash -euxo pipefail {0}
135 - name: steps::install_mold
136 run: ./script/install-mold
137 shell: bash -euxo pipefail {0}
138 - name: steps::download_wasi_sdk
139 run: ./script/download-wasi-sdk
140 shell: bash -euxo pipefail {0}
141 - name: steps::clippy
142 run: ./script/clippy
143 shell: bash -euxo pipefail {0}
144 timeout-minutes: 60
145 clippy_mac:
146 needs:
147 - orchestrate
148 if: needs.orchestrate.outputs.run_tests == 'true'
149 runs-on: self-mini-macos
150 steps:
151 - name: steps::checkout_repo
152 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
153 with:
154 clean: false
155 - name: steps::setup_cargo_config
156 run: |
157 mkdir -p ./../.cargo
158 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
159 shell: bash -euxo pipefail {0}
160 - name: steps::clippy
161 run: ./script/clippy
162 shell: bash -euxo pipefail {0}
163 timeout-minutes: 60
164 run_tests_windows:
165 needs:
166 - orchestrate
167 if: needs.orchestrate.outputs.run_tests == 'true'
168 runs-on: self-32vcpu-windows-2022
169 steps:
170 - name: steps::checkout_repo
171 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
172 with:
173 clean: false
174 - name: steps::setup_cargo_config
175 run: |
176 New-Item -ItemType Directory -Path "./../.cargo" -Force
177 Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
178 shell: pwsh
179 - name: steps::setup_node
180 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
181 with:
182 node-version: '20'
183 - name: steps::clear_target_dir_if_large
184 run: ./script/clear-target-dir-if-larger-than.ps1 250
185 shell: pwsh
186 - name: steps::cargo_nextest
187 run: cargo nextest run --workspace --no-fail-fast
188 shell: pwsh
189 - name: steps::cleanup_cargo_config
190 if: always()
191 run: |
192 Remove-Item -Recurse -Path "./../.cargo" -Force -ErrorAction SilentlyContinue
193 shell: pwsh
194 timeout-minutes: 60
195 run_tests_linux:
196 needs:
197 - orchestrate
198 if: needs.orchestrate.outputs.run_tests == 'true'
199 runs-on: namespace-profile-16x32-ubuntu-2204
200 steps:
201 - name: steps::checkout_repo
202 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
203 with:
204 clean: false
205 - name: steps::setup_cargo_config
206 run: |
207 mkdir -p ./../.cargo
208 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
209 shell: bash -euxo pipefail {0}
210 - name: steps::cache_rust_dependencies_namespace
211 uses: namespacelabs/nscloud-cache-action@v1
212 with:
213 cache: rust
214 - name: steps::setup_linux
215 run: ./script/linux
216 shell: bash -euxo pipefail {0}
217 - name: steps::install_mold
218 run: ./script/install-mold
219 shell: bash -euxo pipefail {0}
220 - name: steps::download_wasi_sdk
221 run: ./script/download-wasi-sdk
222 shell: bash -euxo pipefail {0}
223 - name: steps::setup_node
224 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
225 with:
226 node-version: '20'
227 - name: steps::cargo_install_nextest
228 uses: taiki-e/install-action@nextest
229 - name: steps::clear_target_dir_if_large
230 run: ./script/clear-target-dir-if-larger-than 250
231 shell: bash -euxo pipefail {0}
232 - name: steps::cargo_nextest
233 run: cargo nextest run --workspace --no-fail-fast
234 shell: bash -euxo pipefail {0}
235 - name: steps::cleanup_cargo_config
236 if: always()
237 run: |
238 rm -rf ./../.cargo
239 shell: bash -euxo pipefail {0}
240 timeout-minutes: 60
241 run_tests_mac:
242 needs:
243 - orchestrate
244 if: needs.orchestrate.outputs.run_tests == 'true'
245 runs-on: self-mini-macos
246 steps:
247 - name: steps::checkout_repo
248 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
249 with:
250 clean: false
251 - name: steps::setup_cargo_config
252 run: |
253 mkdir -p ./../.cargo
254 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
255 shell: bash -euxo pipefail {0}
256 - name: steps::setup_node
257 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
258 with:
259 node-version: '20'
260 - name: steps::clear_target_dir_if_large
261 run: ./script/clear-target-dir-if-larger-than 300
262 shell: bash -euxo pipefail {0}
263 - name: steps::cargo_nextest
264 run: cargo nextest run --workspace --no-fail-fast
265 shell: bash -euxo pipefail {0}
266 - name: steps::cleanup_cargo_config
267 if: always()
268 run: |
269 rm -rf ./../.cargo
270 shell: bash -euxo pipefail {0}
271 timeout-minutes: 60
272 doctests:
273 needs:
274 - orchestrate
275 if: needs.orchestrate.outputs.run_tests == 'true'
276 runs-on: namespace-profile-16x32-ubuntu-2204
277 steps:
278 - name: steps::checkout_repo
279 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
280 with:
281 clean: false
282 - name: steps::cache_rust_dependencies_namespace
283 uses: namespacelabs/nscloud-cache-action@v1
284 with:
285 cache: rust
286 - name: steps::setup_linux
287 run: ./script/linux
288 shell: bash -euxo pipefail {0}
289 - name: steps::install_mold
290 run: ./script/install-mold
291 shell: bash -euxo pipefail {0}
292 - name: steps::download_wasi_sdk
293 run: ./script/download-wasi-sdk
294 shell: bash -euxo pipefail {0}
295 - name: steps::setup_cargo_config
296 run: |
297 mkdir -p ./../.cargo
298 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
299 shell: bash -euxo pipefail {0}
300 - id: run_doctests
301 name: run_tests::doctests::run_doctests
302 run: |
303 cargo test --workspace --doc --no-fail-fast
304 shell: bash -euxo pipefail {0}
305 - name: steps::cleanup_cargo_config
306 if: always()
307 run: |
308 rm -rf ./../.cargo
309 shell: bash -euxo pipefail {0}
310 timeout-minutes: 60
311 check_workspace_binaries:
312 needs:
313 - orchestrate
314 if: needs.orchestrate.outputs.run_tests == 'true'
315 runs-on: namespace-profile-8x16-ubuntu-2204
316 steps:
317 - name: steps::checkout_repo
318 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
319 with:
320 clean: false
321 - name: steps::setup_cargo_config
322 run: |
323 mkdir -p ./../.cargo
324 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
325 shell: bash -euxo pipefail {0}
326 - name: steps::cache_rust_dependencies_namespace
327 uses: namespacelabs/nscloud-cache-action@v1
328 with:
329 cache: rust
330 - name: steps::setup_linux
331 run: ./script/linux
332 shell: bash -euxo pipefail {0}
333 - name: steps::install_mold
334 run: ./script/install-mold
335 shell: bash -euxo pipefail {0}
336 - name: steps::download_wasi_sdk
337 run: ./script/download-wasi-sdk
338 shell: bash -euxo pipefail {0}
339 - name: cargo build -p collab
340 run: cargo build -p collab
341 shell: bash -euxo pipefail {0}
342 - name: cargo build --workspace --bins --examples
343 run: cargo build --workspace --bins --examples
344 shell: bash -euxo pipefail {0}
345 - name: steps::cleanup_cargo_config
346 if: always()
347 run: |
348 rm -rf ./../.cargo
349 shell: bash -euxo pipefail {0}
350 timeout-minutes: 60
351 check_dependencies:
352 needs:
353 - orchestrate
354 if: needs.orchestrate.outputs.run_tests == 'true'
355 runs-on: namespace-profile-2x4-ubuntu-2404
356 steps:
357 - name: steps::checkout_repo
358 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
359 with:
360 clean: false
361 - name: steps::cache_rust_dependencies_namespace
362 uses: namespacelabs/nscloud-cache-action@v1
363 with:
364 cache: rust
365 - name: run_tests::check_dependencies::install_cargo_machete
366 uses: clechasseur/rs-cargo@8435b10f6e71c2e3d4d3b7573003a8ce4bfc6386
367 with:
368 command: install
369 args: cargo-machete@0.7.0
370 - name: run_tests::check_dependencies::run_cargo_machete
371 uses: clechasseur/rs-cargo@8435b10f6e71c2e3d4d3b7573003a8ce4bfc6386
372 with:
373 command: machete
374 - name: run_tests::check_dependencies::check_cargo_lock
375 run: cargo update --locked --workspace
376 shell: bash -euxo pipefail {0}
377 - name: run_tests::check_dependencies::check_vulnerable_dependencies
378 if: github.event_name == 'pull_request'
379 uses: actions/dependency-review-action@67d4f4bd7a9b17a0db54d2a7519187c65e339de8
380 with:
381 license-check: false
382 timeout-minutes: 60
383 check_docs:
384 needs:
385 - orchestrate
386 if: needs.orchestrate.outputs.run_docs == 'true'
387 runs-on: namespace-profile-8x16-ubuntu-2204
388 steps:
389 - name: steps::checkout_repo
390 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
391 with:
392 clean: false
393 - name: steps::setup_cargo_config
394 run: |
395 mkdir -p ./../.cargo
396 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
397 shell: bash -euxo pipefail {0}
398 - name: steps::cache_rust_dependencies_namespace
399 uses: namespacelabs/nscloud-cache-action@v1
400 with:
401 cache: rust
402 - name: run_tests::check_docs::lychee_link_check
403 uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332
404 with:
405 args: --no-progress --exclude '^http' './docs/src/**/*'
406 fail: true
407 jobSummary: false
408 - name: steps::setup_linux
409 run: ./script/linux
410 shell: bash -euxo pipefail {0}
411 - name: steps::install_mold
412 run: ./script/install-mold
413 shell: bash -euxo pipefail {0}
414 - name: steps::download_wasi_sdk
415 run: ./script/download-wasi-sdk
416 shell: bash -euxo pipefail {0}
417 - name: ./script/generate-action-metadata
418 run: ./script/generate-action-metadata
419 shell: bash -euxo pipefail {0}
420 - name: run_tests::check_docs::install_mdbook
421 uses: peaceiris/actions-mdbook@ee69d230fe19748b7abf22df32acaa93833fad08
422 with:
423 mdbook-version: 0.4.37
424 - name: run_tests::check_docs::build_docs
425 run: |
426 mkdir -p target/deploy
427 mdbook build ./docs --dest-dir=../target/deploy/docs/
428 shell: bash -euxo pipefail {0}
429 - name: run_tests::check_docs::lychee_link_check
430 uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332
431 with:
432 args: --no-progress --exclude '^http' 'target/deploy/docs'
433 fail: true
434 jobSummary: false
435 timeout-minutes: 60
436 check_licenses:
437 needs:
438 - orchestrate
439 if: needs.orchestrate.outputs.run_licenses == 'true'
440 runs-on: namespace-profile-2x4-ubuntu-2404
441 steps:
442 - name: steps::checkout_repo
443 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
444 with:
445 clean: false
446 - name: steps::cache_rust_dependencies_namespace
447 uses: namespacelabs/nscloud-cache-action@v1
448 with:
449 cache: rust
450 - name: ./script/check-licenses
451 run: ./script/check-licenses
452 shell: bash -euxo pipefail {0}
453 - name: ./script/generate-licenses
454 run: ./script/generate-licenses
455 shell: bash -euxo pipefail {0}
456 check_scripts:
457 needs:
458 - orchestrate
459 if: needs.orchestrate.outputs.run_action_checks == 'true'
460 runs-on: namespace-profile-2x4-ubuntu-2404
461 steps:
462 - name: steps::checkout_repo
463 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
464 with:
465 clean: false
466 - name: run_tests::check_scripts::run_shellcheck
467 run: ./script/shellcheck-scripts error
468 shell: bash -euxo pipefail {0}
469 - id: get_actionlint
470 name: run_tests::check_scripts::download_actionlint
471 run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
472 shell: bash -euxo pipefail {0}
473 - name: run_tests::check_scripts::run_actionlint
474 run: |
475 ${{ steps.get_actionlint.outputs.executable }} -color
476 shell: bash -euxo pipefail {0}
477 - name: run_tests::check_scripts::check_xtask_workflows
478 run: |
479 cargo xtask workflows
480 if ! git diff --exit-code .github; then
481 echo "Error: .github directory has uncommitted changes after running 'cargo xtask workflows'"
482 echo "Please run 'cargo xtask workflows' locally and commit the changes"
483 exit 1
484 fi
485 shell: bash -euxo pipefail {0}
486 timeout-minutes: 60
487 build_nix_linux_x86_64:
488 needs:
489 - orchestrate
490 if: needs.orchestrate.outputs.run_nix == 'true'
491 runs-on: namespace-profile-32x64-ubuntu-2004
492 env:
493 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
494 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
495 ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
496 GIT_LFS_SKIP_SMUDGE: '1'
497 steps:
498 - name: steps::checkout_repo
499 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
500 with:
501 clean: false
502 - name: nix_build::build_nix::install_nix
503 uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f
504 with:
505 github_access_token: ${{ secrets.GITHUB_TOKEN }}
506 - name: nix_build::build_nix::cachix_action
507 uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad
508 with:
509 name: zed
510 authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
511 cachixArgs: -v
512 pushFilter: -zed-editor-[0-9.]*-nightly
513 - name: nix_build::build_nix::build
514 run: nix build .#debug -L --accept-flake-config
515 shell: bash -euxo pipefail {0}
516 timeout-minutes: 60
517 continue-on-error: true
518 build_nix_mac_aarch64:
519 needs:
520 - orchestrate
521 if: needs.orchestrate.outputs.run_nix == 'true'
522 runs-on: self-mini-macos
523 env:
524 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
525 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
526 ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
527 GIT_LFS_SKIP_SMUDGE: '1'
528 steps:
529 - name: steps::checkout_repo
530 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
531 with:
532 clean: false
533 - name: nix_build::build_nix::set_path
534 run: |
535 echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH"
536 echo "/Users/administrator/.nix-profile/bin" >> "$GITHUB_PATH"
537 shell: bash -euxo pipefail {0}
538 - name: nix_build::build_nix::cachix_action
539 uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad
540 with:
541 name: zed
542 authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
543 cachixArgs: -v
544 pushFilter: -zed-editor-[0-9.]*-nightly
545 - name: nix_build::build_nix::build
546 run: nix build .#debug -L --accept-flake-config
547 shell: bash -euxo pipefail {0}
548 - name: nix_build::build_nix::limit_store
549 run: |-
550 if [ "$(du -sm /nix/store | cut -f1)" -gt 50000 ]; then
551 nix-collect-garbage -d || true
552 fi
553 shell: bash -euxo pipefail {0}
554 timeout-minutes: 60
555 continue-on-error: true
556 check_postgres_and_protobuf_migrations:
557 needs:
558 - orchestrate
559 if: needs.orchestrate.outputs.run_tests == 'true'
560 runs-on: namespace-profile-16x32-ubuntu-2204
561 env:
562 GIT_AUTHOR_NAME: Protobuf Action
563 GIT_AUTHOR_EMAIL: ci@zed.dev
564 GIT_COMMITTER_NAME: Protobuf Action
565 GIT_COMMITTER_EMAIL: ci@zed.dev
566 steps:
567 - name: steps::checkout_repo
568 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
569 with:
570 fetch-depth: 0
571 - name: run_tests::check_postgres_and_protobuf_migrations::remove_untracked_files
572 run: git clean -df
573 shell: bash -euxo pipefail {0}
574 - name: run_tests::check_postgres_and_protobuf_migrations::ensure_fresh_merge
575 run: |
576 if [ -z "$GITHUB_BASE_REF" ];
577 then
578 echo "BUF_BASE_BRANCH=$(git merge-base origin/main HEAD)" >> "$GITHUB_ENV"
579 else
580 git checkout -B temp
581 git merge -q "origin/$GITHUB_BASE_REF" -m "merge main into temp"
582 echo "BUF_BASE_BRANCH=$GITHUB_BASE_REF" >> "$GITHUB_ENV"
583 fi
584 shell: bash -euxo pipefail {0}
585 - name: run_tests::check_postgres_and_protobuf_migrations::bufbuild_setup_action
586 uses: bufbuild/buf-setup-action@v1
587 with:
588 version: v1.29.0
589 github_token: ${{ secrets.GITHUB_TOKEN }}
590 - name: run_tests::check_postgres_and_protobuf_migrations::bufbuild_breaking_action
591 uses: bufbuild/buf-breaking-action@v1
592 with:
593 input: crates/proto/proto/
594 against: https://github.com/${GITHUB_REPOSITORY}.git#branch=${BUF_BASE_BRANCH},subdir=crates/proto/proto/
595 timeout-minutes: 60
596 tests_pass:
597 needs:
598 - orchestrate
599 - check_style
600 - clippy_windows
601 - clippy_linux
602 - clippy_mac
603 - run_tests_windows
604 - run_tests_linux
605 - run_tests_mac
606 - doctests
607 - check_workspace_binaries
608 - check_dependencies
609 - check_docs
610 - check_licenses
611 - check_scripts
612 - build_nix_linux_x86_64
613 - build_nix_mac_aarch64
614 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions') && always()
615 runs-on: namespace-profile-2x4-ubuntu-2404
616 steps:
617 - name: run_tests::tests_pass
618 run: |
619 set +x
620 EXIT_CODE=0
621
622 check_result() {
623 echo "* $1: $2"
624 if [[ "$2" != "skipped" && "$2" != "success" ]]; then EXIT_CODE=1; fi
625 }
626
627 check_result "orchestrate" "${{ needs.orchestrate.result }}"
628 check_result "check_style" "${{ needs.check_style.result }}"
629 check_result "clippy_windows" "${{ needs.clippy_windows.result }}"
630 check_result "clippy_linux" "${{ needs.clippy_linux.result }}"
631 check_result "clippy_mac" "${{ needs.clippy_mac.result }}"
632 check_result "run_tests_windows" "${{ needs.run_tests_windows.result }}"
633 check_result "run_tests_linux" "${{ needs.run_tests_linux.result }}"
634 check_result "run_tests_mac" "${{ needs.run_tests_mac.result }}"
635 check_result "doctests" "${{ needs.doctests.result }}"
636 check_result "check_workspace_binaries" "${{ needs.check_workspace_binaries.result }}"
637 check_result "check_dependencies" "${{ needs.check_dependencies.result }}"
638 check_result "check_docs" "${{ needs.check_docs.result }}"
639 check_result "check_licenses" "${{ needs.check_licenses.result }}"
640 check_result "check_scripts" "${{ needs.check_scripts.result }}"
641 check_result "build_nix_linux_x86_64" "${{ needs.build_nix_linux_x86_64.result }}"
642 check_result "build_nix_mac_aarch64" "${{ needs.build_nix_mac_aarch64.result }}"
643
644 exit $EXIT_CODE
645 shell: bash -euxo pipefail {0}
646concurrency:
647 group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
648 cancel-in-progress: true