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