Skip to content

Commit

Permalink
Allow disabling (most of) CI with no-test label (#9456)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb authored Nov 26, 2024
1 parent 2534156 commit ba94d85
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
cargo-clippy:
timeout-minutes: 10
needs: determine_changes
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on: ubuntu-latest
name: "cargo clippy | ubuntu"
steps:
Expand All @@ -115,7 +115,7 @@ jobs:
cargo-clippy-windows:
timeout-minutes: 15
needs: determine_changes
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on:
labels: "windows-latest-xlarge"
name: "cargo clippy | windows"
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
cargo-dev-generate-all:
timeout-minutes: 10
needs: determine_changes
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on: ubuntu-latest
name: "cargo dev generate-all"
steps:
Expand Down Expand Up @@ -172,7 +172,7 @@ jobs:
cargo-test-linux:
timeout-minutes: 10
needs: determine_changes
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on:
labels: "depot-ubuntu-22.04-16"
name: "cargo test | ubuntu"
Expand Down Expand Up @@ -218,7 +218,7 @@ jobs:
cargo-test-macos:
timeout-minutes: 10
needs: determine_changes
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on:
labels: "depot-macos-latest"
name: "cargo test | macos"
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:
cargo-test-windows:
timeout-minutes: 15
needs: determine_changes
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on:
labels: "windows-latest-xlarge"
name: "cargo test | windows"
Expand Down Expand Up @@ -333,7 +333,7 @@ jobs:
windows-trampoline-check:
timeout-minutes: 15
needs: determine_changes
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on: windows-latest-xlarge
name: "check windows trampoline | ${{ matrix.target-arch }}"
strategy:
Expand Down Expand Up @@ -387,7 +387,7 @@ jobs:
windows-trampoline-test:
timeout-minutes: 10
needs: determine_changes
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on: windows-latest
name: "test windows trampoline | ${{ matrix.target-arch }}"
strategy:
Expand Down Expand Up @@ -455,7 +455,7 @@ jobs:
build-binary-linux:
timeout-minutes: 10
needs: determine_changes
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on:
labels: ubuntu-latest-large
name: "build binary | linux"
Expand Down Expand Up @@ -483,7 +483,7 @@ jobs:
build-binary-macos-aarch64:
timeout-minutes: 10
needs: determine_changes
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on:
labels: macos-14
name: "build binary | macos aarch64"
Expand All @@ -506,7 +506,7 @@ jobs:
build-binary-macos-x86_64:
timeout-minutes: 10
needs: determine_changes
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on:
labels: macos-latest-large # Intel runner on GitHub
name: "build binary | macos x86_64"
Expand All @@ -529,7 +529,7 @@ jobs:
build-binary-windows:
needs: determine_changes
timeout-minutes: 10
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on:
labels: windows-latest-large
name: "build binary | windows"
Expand Down Expand Up @@ -562,7 +562,7 @@ jobs:
cargo-build-msrv:
name: "cargo build (msrv)"
needs: determine_changes
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on:
labels: ubuntu-latest-large
timeout-minutes: 10
Expand All @@ -584,7 +584,7 @@ jobs:
build-binary-freebsd:
needs: determine_changes
timeout-minutes: 10
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on:
labels: ubuntu-latest
name: "build binary | freebsd"
Expand Down Expand Up @@ -1114,7 +1114,7 @@ jobs:
# Flag that is raised when any code is changed
code: ${{ steps.changed.outputs.code_any_changed }}
# Only the main repository is a trusted publisher
if: github.repository == 'astral-sh/uv'
if: github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test')
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -1135,7 +1135,7 @@ jobs:
needs: integration-test-publish-changed
name: "integration test | uv publish"
runs-on: ubuntu-latest
if: ${{ github.repository == 'astral-sh/uv' && github.event.pull_request.head.repo.fork != true && (needs.integration-test-publish-changed.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && github.event.pull_request.head.repo.fork != true && (needs.integration-test-publish-changed.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
environment: uv-test-publish
env:
# No dbus in GitHub Actions
Expand Down Expand Up @@ -1823,7 +1823,7 @@ jobs:
benchmarks:
runs-on: ubuntu-latest
needs: determine_changes
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
timeout-minutes: 20
steps:
- name: "Checkout Branch"
Expand Down

0 comments on commit ba94d85

Please sign in to comment.