From b2bcfb6ba2a7401c1d955eeeec641f66ed6b91eb Mon Sep 17 00:00:00 2001 From: luna Date: Fri, 16 Oct 2026 23:08:50 -0700 Subject: [PATCH] ci: run nothing for unrelated labels, never cancel a real run for them; ZZDesign tests in the ios job Adding a label other than ios-ci (apps-ci) or run-e2e/ios-ci (apps-e2e) skips every job and uses its own concurrency group, so it no longer cancels or duplicates the pull request's real run (26 of 82 Apps CI runs were cancelled duplicates). The ios job also runs the ZZDesign package tests. ci.yml's header comment no longer says apps-ci is to be added. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/apps-ci.yml | 11 +++++++++-- .github/workflows/apps-e2e.yml | 8 +++++--- .github/workflows/ci.yml | 4 ++-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/apps-ci.yml b/.github/workflows/apps-ci.yml index 561b037..c8fce06 100644 --- a/.github/workflows/apps-ci.yml +++ b/.github/workflows/apps-ci.yml @@ -20,7 +20,9 @@ permissions: contents: read concurrency: - group: apps-ci-${{ github.event.pull_request.number || github.ref }} + # A label other than ios-ci runs nothing (see RELEVANT below), so it gets + # its own group and never cancels a real run of the same pull request. + group: apps-ci-${{ github.event.pull_request.number || github.ref }}-${{ (github.event.action == 'labeled' && github.event.label.name != 'ios-ci') && 'skip' || 'run' }} cancel-in-progress: true env: @@ -33,6 +35,8 @@ env: jobs: checks: + # RELEVANT: adding a label other than ios-ci reruns nothing. + if: ${{ github.event.action != 'labeled' || github.event.label.name == 'ios-ci' }} runs-on: ubuntu-latest timeout-minutes: 15 steps: @@ -63,6 +67,7 @@ jobs: run: python3 -m unittest discover -s apps/ios/scripts -p "test_*.py" -v android: + if: ${{ github.event.action != 'labeled' || github.event.label.name == 'ios-ci' }} runs-on: ubuntu-latest timeout-minutes: 60 defaults: @@ -135,7 +140,7 @@ jobs: script: ./gradlew :app:connectedDemoDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=${{ env.ZZ_ANDROID_READ_TEST }} ios: - if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'ios-ci') }} + if: ${{ (github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'ios-ci')) && (github.event.action != 'labeled' || github.event.label.name == 'ios-ci') }} runs-on: macos-26 timeout-minutes: 60 steps: @@ -159,6 +164,8 @@ jobs: run: swift test --package-path apps/ios/Packages/ZZCore - name: ZZAPI tests (stub transport fixtures) run: swift test --package-path apps/ios/Packages/ZZAPI + - name: ZZDesign tests (tokens and fonts) + run: swift test --package-path apps/ios/Packages/ZZDesign - name: App tests and snapshots (Demo) run: >- xcodebuild test diff --git a/.github/workflows/apps-e2e.yml b/.github/workflows/apps-e2e.yml index eae4514..7941740 100644 --- a/.github/workflows/apps-e2e.yml +++ b/.github/workflows/apps-e2e.yml @@ -20,7 +20,9 @@ permissions: contents: read concurrency: - group: apps-e2e-${{ github.event.pull_request.number || github.ref }} + # A label other than run-e2e or ios-ci runs nothing, so it gets its own group and + # never cancels a real run of the same pull request. + group: apps-e2e-${{ github.event.pull_request.number || github.ref }}-${{ (github.event.action == 'labeled' && github.event.label.name != 'run-e2e' && github.event.label.name != 'ios-ci') && 'skip' || 'run' }} cancel-in-progress: true env: @@ -32,7 +34,7 @@ env: jobs: android: - if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run-e2e') }} + if: ${{ (github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run-e2e')) && (github.event.action != 'labeled' || github.event.label.name == 'run-e2e') }} runs-on: ubuntu-latest timeout-minutes: 60 steps: @@ -95,7 +97,7 @@ jobs: if-no-files-found: ignore ios: - if: ${{ github.event_name == 'workflow_dispatch' || (contains(github.event.pull_request.labels.*.name, 'run-e2e') && contains(github.event.pull_request.labels.*.name, 'ios-ci')) }} + if: ${{ (github.event_name == 'workflow_dispatch' || (contains(github.event.pull_request.labels.*.name, 'run-e2e') && contains(github.event.pull_request.labels.*.name, 'ios-ci'))) && (github.event.action != 'labeled' || github.event.label.name == 'run-e2e' || github.event.label.name == 'ios-ci') }} runs-on: macos-26 timeout-minutes: 60 steps: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5958393..04f8613 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ name: CI -# Spec lint and the pinned OpenAPI check. App tests wait for -# .github/workflows/apps-ci.yml, which the build adds with the test targets. +# Spec lint and the pinned OpenAPI check. App tests run in +# .github/workflows/apps-ci.yml. # The job id stays `build`, matching the zzThis required check name. on: