From da4c14c83caa0b30bb7d6109eaa65285c1dea41c Mon Sep 17 00:00:00 2001 From: Dylan Frankland Date: Wed, 3 Jun 2026 15:13:06 -0700 Subject: [PATCH] (Chore): Attach test-collection-short-id to staging uploads Tag analytics-cli staging uploads from this repo with a test collection short ID so the staging org can route them into the right collection. PR-CI uploads use 2tYJWMu7; the smoke-test action uses z2dzjLHm. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/actions/perform_smoke_test/action.yaml | 9 ++++++--- .github/workflows/pull_request.yml | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/actions/perform_smoke_test/action.yaml b/.github/actions/perform_smoke_test/action.yaml index aeeebe1c..c7e90535 100644 --- a/.github/actions/perform_smoke_test/action.yaml +++ b/.github/actions/perform_smoke_test/action.yaml @@ -90,7 +90,8 @@ runs: --org-url-slug trunk-staging-org \ --xcresult-path smoke-test/swift/TestResults.xcresult \ --token ${{ inputs.staging-api-token }} \ - --test-process-exit-code $EXIT_CODE + --test-process-exit-code $EXIT_CODE \ + --test-collection-short-id z2dzjLHm env: TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io @@ -104,7 +105,8 @@ runs: ./${{ inputs.cli-binary-location }} upload \ --org-url-slug trunk-staging-org \ --junit-paths "${{ github.workspace }}/target/**/*junit.xml" \ - --token ${{ inputs.staging-api-token }} + --token ${{ inputs.staging-api-token }} \ + --test-collection-short-id z2dzjLHm - name: Upload to staging with public repo id id: staging-upload-public-repo-id @@ -136,7 +138,8 @@ runs: --org-url-slug trunk-staging-org \ --junit-paths "${{ github.workspace }}/target/**/*junit.xml" \ --token ${{ inputs.staging-api-token }} \ - --variant smoke-test-variant + --variant smoke-test-variant \ + --test-collection-short-id z2dzjLHm EXIT_CODE=$? if [ $EXIT_CODE -eq 0 ]; then echo "ERROR: Expected upload with variant to fail, but it succeeded" diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index f6a861e4..89f18484 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -204,7 +204,8 @@ jobs: --junit-paths ${{ github.workspace }}/target/**/*junit.xml \ --org-url-slug trunk-staging-org \ --token ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} \ - --test-process-exit-code ${{ steps.extract.outputs.test-step-outcome }} + --test-process-exit-code ${{ steps.extract.outputs.test-step-outcome }} \ + --test-collection-short-id 2tYJWMu7 - name: Upload results to prod using built CLI shell: bash