Revert docs-only test-skipping with Merge Queue (#23180)

These checks were not functioning as intended. Notably tests were
skipped for today's hotfix release of Preview
[v0.169.2-pre](https://github.com/zed-industries/zed/actions/runs/12790602047):

Separately these checks were flawed as they would only be considered
"docs only" if the diff between the PR branch base and main also did not
have any subsequent non-docs changes.

Reverting until we can figure out something better.
This commit is contained in:
Peter Tripp 2025-01-15 11:47:01 -05:00 committed by GitHub
parent cc8746a66b
commit 0150eaf8c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,31 +24,6 @@ env:
RUSTFLAGS: "-D warnings" RUSTFLAGS: "-D warnings"
jobs: jobs:
check_docs_only:
runs-on: ubuntu-latest
outputs:
docs_only: ${{ steps.check_changes.outputs.docs_only }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Check for non-docs changes
id: check_changes
run: |
if [ "${{ github.event_name }}" == "merge_group" ]; then
# When we're running in a merge queue, never assume that the changes
# are docs-only, as there could be other PRs in the group that
# contain non-docs changes.
echo "Running in the merge queue"
echo "docs_only=false" >> $GITHUB_OUTPUT
elif git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -qvE '^docs/'; then
echo "Detected non-docs changes"
echo "docs_only=false" >> $GITHUB_OUTPUT
else
echo "Docs-only change"
echo "docs_only=true" >> $GITHUB_OUTPUT
fi
migration_checks: migration_checks:
name: Check Postgres and Protobuf migrations, mergability name: Check Postgres and Protobuf migrations, mergability
if: github.repository_owner == 'zed-industries' if: github.repository_owner == 'zed-industries'
@ -121,7 +96,6 @@ jobs:
runs-on: runs-on:
- self-hosted - self-hosted
- test - test
needs: check_docs_only
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
@ -129,35 +103,28 @@ jobs:
clean: false clean: false
- name: cargo clippy - name: cargo clippy
if: needs.check_docs_only.outputs.docs_only == 'false'
run: ./script/clippy run: ./script/clippy
- name: Check unused dependencies - name: Check unused dependencies
if: needs.check_docs_only.outputs.docs_only == 'false'
uses: bnjbvr/cargo-machete@main uses: bnjbvr/cargo-machete@main
- name: Check licenses - name: Check licenses
if: needs.check_docs_only.outputs.docs_only == 'false'
run: | run: |
script/check-licenses script/check-licenses
script/generate-licenses /tmp/zed_licenses_output script/generate-licenses /tmp/zed_licenses_output
- name: Check for new vulnerable dependencies - name: Check for new vulnerable dependencies
if: github.event_name == 'pull_request' && needs.check_docs_only.outputs.docs_only == 'false'
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4 uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4
with: with:
license-check: false license-check: false
- name: Run tests - name: Run tests
if: needs.check_docs_only.outputs.docs_only == 'false'
uses: ./.github/actions/run_tests uses: ./.github/actions/run_tests
- name: Build collab - name: Build collab
if: needs.check_docs_only.outputs.docs_only == 'false'
run: cargo build -p collab run: cargo build -p collab
- name: Build other binaries and features - name: Build other binaries and features
if: needs.check_docs_only.outputs.docs_only == 'false'
run: | run: |
cargo build --workspace --bins --all-features cargo build --workspace --bins --all-features
cargo check -p gpui --features "macos-blade" cargo check -p gpui --features "macos-blade"
@ -171,7 +138,6 @@ jobs:
if: github.repository_owner == 'zed-industries' if: github.repository_owner == 'zed-industries'
runs-on: runs-on:
- buildjet-16vcpu-ubuntu-2204 - buildjet-16vcpu-ubuntu-2204
needs: check_docs_only
steps: steps:
- name: Add Rust to the PATH - name: Add Rust to the PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
@ -182,26 +148,21 @@ jobs:
clean: false clean: false
- name: Cache dependencies - name: Cache dependencies
if: needs.check_docs_only.outputs.docs_only == 'false'
uses: swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2 uses: swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2
with: with:
save-if: ${{ github.ref == 'refs/heads/main' }} save-if: ${{ github.ref == 'refs/heads/main' }}
cache-provider: "buildjet" cache-provider: "buildjet"
- name: Install Linux dependencies - name: Install Linux dependencies
if: needs.check_docs_only.outputs.docs_only == 'false'
run: ./script/linux run: ./script/linux
- name: cargo clippy - name: cargo clippy
if: needs.check_docs_only.outputs.docs_only == 'false'
run: ./script/clippy run: ./script/clippy
- name: Run tests - name: Run tests
if: needs.check_docs_only.outputs.docs_only == 'false'
uses: ./.github/actions/run_tests uses: ./.github/actions/run_tests
- name: Build other binaries and features - name: Build other binaries and features
if: needs.check_docs_only.outputs.docs_only == 'false'
run: | run: |
cargo build -p zed cargo build -p zed
cargo check -p workspace cargo check -p workspace
@ -212,7 +173,6 @@ jobs:
if: github.repository_owner == 'zed-industries' if: github.repository_owner == 'zed-industries'
runs-on: runs-on:
- buildjet-16vcpu-ubuntu-2204 - buildjet-16vcpu-ubuntu-2204
needs: check_docs_only
steps: steps:
- name: Add Rust to the PATH - name: Add Rust to the PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
@ -223,18 +183,15 @@ jobs:
clean: false clean: false
- name: Cache dependencies - name: Cache dependencies
if: needs.check_docs_only.outputs.docs_only == 'false'
uses: swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2 uses: swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2
with: with:
save-if: ${{ github.ref == 'refs/heads/main' }} save-if: ${{ github.ref == 'refs/heads/main' }}
cache-provider: "buildjet" cache-provider: "buildjet"
- name: Install Clang & Mold - name: Install Clang & Mold
if: needs.check_docs_only.outputs.docs_only == 'false'
run: ./script/remote-server && ./script/install-mold 2.34.0 run: ./script/remote-server && ./script/install-mold 2.34.0
- name: Build Remote Server - name: Build Remote Server
if: needs.check_docs_only.outputs.docs_only == 'false'
run: cargo build -p remote_server run: cargo build -p remote_server
# todo(windows): Actually run the tests # todo(windows): Actually run the tests
@ -243,7 +200,6 @@ jobs:
name: (Windows) Run Clippy and tests name: (Windows) Run Clippy and tests
if: github.repository_owner == 'zed-industries' if: github.repository_owner == 'zed-industries'
runs-on: hosted-windows-1 runs-on: hosted-windows-1
needs: check_docs_only
steps: steps:
# more info here:- https://github.com/rust-lang/cargo/issues/13020 # more info here:- https://github.com/rust-lang/cargo/issues/13020
- name: Enable longer pathnames for git - name: Enable longer pathnames for git
@ -254,19 +210,16 @@ jobs:
clean: false clean: false
- name: Cache dependencies - name: Cache dependencies
if: needs.check_docs_only.outputs.docs_only == 'false'
uses: swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2 uses: swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2
with: with:
save-if: ${{ github.ref == 'refs/heads/main' }} save-if: ${{ github.ref == 'refs/heads/main' }}
cache-provider: "github" cache-provider: "github"
- name: cargo clippy - name: cargo clippy
if: needs.check_docs_only.outputs.docs_only == 'false'
# Windows can't run shell scripts, so we need to use `cargo xtask`. # Windows can't run shell scripts, so we need to use `cargo xtask`.
run: cargo xtask clippy run: cargo xtask clippy
- name: Build Zed - name: Build Zed
if: needs.check_docs_only.outputs.docs_only == 'false'
run: cargo build run: cargo build
bundle-mac: bundle-mac:
@ -359,9 +312,9 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
bundle-linux: bundle-linux-x86_x64:
timeout-minutes: 60 timeout-minutes: 60
name: Create a Linux bundle name: Linux x86_x64 release bundle
runs-on: runs-on:
- buildjet-16vcpu-ubuntu-2004 - buildjet-16vcpu-ubuntu-2004
if: ${{ startsWith(github.ref, 'refs/tags/v') || contains(github.event.pull_request.labels.*.name, 'run-bundling') }} if: ${{ startsWith(github.ref, 'refs/tags/v') || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
@ -409,7 +362,7 @@ jobs:
bundle-linux-aarch64: # this runs on ubuntu22.04 bundle-linux-aarch64: # this runs on ubuntu22.04
timeout-minutes: 60 timeout-minutes: 60
name: Create arm64 Linux bundle name: Linux arm64 release bundle
runs-on: runs-on:
- buildjet-16vcpu-ubuntu-2204-arm - buildjet-16vcpu-ubuntu-2204-arm
if: ${{ startsWith(github.ref, 'refs/tags/v') || contains(github.event.pull_request.labels.*.name, 'run-bundling') }} if: ${{ startsWith(github.ref, 'refs/tags/v') || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
@ -458,7 +411,7 @@ jobs:
auto-release-preview: auto-release-preview:
name: Auto release preview name: Auto release preview
if: ${{ startsWith(github.ref, 'refs/tags/v') && endsWith(github.ref, '-pre') && !endsWith(github.ref, '.0-pre') }} if: ${{ startsWith(github.ref, 'refs/tags/v') && endsWith(github.ref, '-pre') && !endsWith(github.ref, '.0-pre') }}
needs: [bundle-mac, bundle-linux, bundle-linux-aarch64] needs: [bundle-mac, bundle-linux-x86_x64, bundle-linux-aarch64]
runs-on: runs-on:
- self-hosted - self-hosted
- bundle - bundle