Skip to content
Draft
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
- "**.md"
- "**.txt"
workflow_dispatch: # e.g. to manually trigger on foreign PRs
inputs:
capture-corpus:
description: "Capture the raw envelopes and debug files the integration tests produce, as artifacts (see docs/envelope-capture.md). Slower, and the event assertions fail by design."
type: boolean
default: false

env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
Expand Down Expand Up @@ -142,6 +147,8 @@ jobs:
build_platform: WebGL
env:
UNITY_PATH: docker exec unity unity-editor
# Empty unless a capture run was dispatched; see docs/envelope-capture.md.
SENTRY_CAPTURE_PATH: ${{ format('test/IntegrationTest/capture/webgl-{0}', matrix.unity-version) }} # TEMPORARY
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down Expand Up @@ -301,6 +308,7 @@ jobs:
uses: ./.github/workflows/test-build-android.yml
with:
unity-version: ${{ matrix.unity-version }}
capture: true # TEMPORARY: validating the capture wiring on this PR

test-run-android:
name: Run Android ${{ matrix.unity-version }} Integration Test
Expand All @@ -314,6 +322,7 @@ jobs:
unity-version: ${{ matrix.unity-version }}
api-level: ${{ matrix.api-level }}
init-type: ${{ matrix.init-type }}
capture: true # TEMPORARY: validating the capture wiring on this PR
strategy:
fail-fast: false
matrix:
Expand All @@ -336,6 +345,7 @@ jobs:
uses: ./.github/workflows/test-build-ios.yml
with:
unity-version: ${{ matrix.unity-version }}
capture: true # TEMPORARY: validating the capture wiring on this PR

test-compile-ios:
name: Compile iOS ${{ matrix.unity-version }} Test
Expand All @@ -350,6 +360,7 @@ jobs:
with:
unity-version: ${{ matrix.unity-version }}
init-type: ${{ matrix.init-type }}
capture: true # TEMPORARY: validating the capture wiring on this PR

test-run-ios:
name: Run iOS ${{ matrix.unity-version }} Integration Test
Expand All @@ -360,6 +371,7 @@ jobs:
unity-version: ${{ matrix.unity-version }}
ios-version: ${{ matrix.ios-version }}
init-type: ${{ matrix.init-type }}
capture: true # TEMPORARY: validating the capture wiring on this PR
secrets:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_TEST_DSN: ${{ secrets.SENTRY_TEST_DSN }}
Expand Down Expand Up @@ -394,6 +406,7 @@ jobs:
uses: ./.github/workflows/test-run-webgl.yml
with:
unity-version: ${{ matrix.unity-version }}
capture: true # TEMPORARY: validating the capture wiring on this PR

test-build-linux:
name: Build Linux ${{ matrix.unity-version }} Integration Test
Expand All @@ -410,6 +423,7 @@ jobs:
uses: ./.github/workflows/test-build-linux.yml
with:
unity-version: ${{ matrix.unity-version }}
capture: true # TEMPORARY: validating the capture wiring on this PR

test-build-windows:
name: Build Windows ${{ matrix.unity-version }} Integration Test
Expand All @@ -426,6 +440,7 @@ jobs:
uses: ./.github/workflows/test-build-windows.yml
with:
unity-version: ${{ matrix.unity-version }}
capture: true # TEMPORARY: validating the capture wiring on this PR

test-build-macos:
name: Build macOS ${{ matrix.unity-version }} Integration Test
Expand All @@ -442,6 +457,7 @@ jobs:
uses: ./.github/workflows/test-build-macos.yml
with:
unity-version: ${{ matrix.unity-version }}
capture: true # TEMPORARY: validating the capture wiring on this PR

test-run-linux:
name: Run Linux ${{ matrix.backend }} ${{ matrix.unity-version }} Integration Test
Expand All @@ -460,6 +476,7 @@ jobs:
unity-version: ${{ matrix.unity-version }}
platform: linux
backend: ${{ matrix.backend }}
capture: true # TEMPORARY: validating the capture wiring on this PR

test-run-windows:
name: Run Windows ${{ matrix.backend }} ${{ matrix.unity-version }} Integration Test
Expand All @@ -478,6 +495,7 @@ jobs:
unity-version: ${{ matrix.unity-version }}
platform: windows
backend: ${{ matrix.backend }}
capture: true # TEMPORARY: validating the capture wiring on this PR

test-run-macos:
name: Run macOS ${{ matrix.backend }} ${{ matrix.unity-version }} Integration Test
Expand All @@ -496,6 +514,7 @@ jobs:
unity-version: ${{ matrix.unity-version }}
platform: macos
backend: ${{ matrix.backend }}
capture: true # TEMPORARY: validating the capture wiring on this PR

build-size-summary:
name: Build Size
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/test-build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
unity-version:
required: true
type: string
capture:
required: false
type: boolean
default: false
description: "Capture the envelopes and debug files this job produces - see docs/envelope-capture.md"
secrets:
UNITY_LICENSE_SERVER_CONFIG:
required: true
Expand All @@ -25,6 +30,8 @@
GITHUB_ACTOR: ${{ github.actor }}
UNITY_PATH: docker exec unity unity-editor
UNITY_VERSION: ${{ inputs.unity-version }}
# Empty unless a capture run was dispatched; see docs/envelope-capture.md.
SENTRY_CAPTURE_PATH: ${{ inputs.capture && format('test/IntegrationTest/capture/android-{0}', inputs.unity-version) || '' }}

steps:
- name: Checkout
Expand Down Expand Up @@ -176,3 +183,11 @@
!samples/IntegrationTest/Build/*_BackUpThisFolder_ButDontShipItWithYourGame
retention-days: 14 # Lower retention period - we only need this to retry CI.

- name: Upload captured corpus
if: ${{ always() && inputs.capture }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: corpus-android-${{ inputs.unity-version }}
path: test/IntegrationTest/capture/
if-no-files-found: warn
retention-days: 14

Check failure on line 193 in .github/workflows/test-build-android.yml

View check run for this annotation

@sentry/warden / warden: security-review

Android corpus artifact can expose SENTRY_AUTH_TOKEN

Uploading `test/IntegrationTest/capture/` publishes capture metadata that records full sentry-cli request headers, including the real `SENTRY_AUTH_TOKEN` used for Android proguard mapping upload. Redact Authorization headers in the capture server, or stop uploading `.meta.json`/`index.jsonl` from capture runs.
Comment thread
sentry-warden[bot] marked this conversation as resolved.
7 changes: 7 additions & 0 deletions .github/workflows/test-build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
unity-version:
required: true
type: string
capture:
required: false
type: boolean
default: false
description: "Capture the envelopes and debug files this job produces - see docs/envelope-capture.md"
secrets:
UNITY_LICENSE_SERVER_CONFIG:
required: true
Expand All @@ -31,6 +36,8 @@ jobs:
GITHUB_ACTOR: ${{ github.actor }}
UNITY_PATH: docker exec unity unity-editor
UNITY_VERSION: ${{ inputs.unity-version }}
# Empty unless a capture run was dispatched; see docs/envelope-capture.md.
SENTRY_CAPTURE_PATH: ${{ inputs.capture && format('test/IntegrationTest/capture/ios-{0}', inputs.unity-version) || '' }}

steps:
- name: Checkout
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/test-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
unity-version:
required: true
type: string
capture:
required: false
type: boolean
default: false
description: "Capture the envelopes and debug files this job produces - see docs/envelope-capture.md"
secrets:
UNITY_LICENSE_SERVER_CONFIG:
required: true
Expand All @@ -26,6 +31,8 @@ jobs:
UNITY_PATH: docker exec unity unity-editor
UNITY_VERSION: ${{ inputs.unity-version }}
BUILD_PLATFORM: Linux
# Empty unless a capture run was dispatched; see docs/envelope-capture.md.
SENTRY_CAPTURE_PATH: ${{ inputs.capture && format('test/IntegrationTest/capture/linux-{0}', inputs.unity-version) || '' }}

steps:
- name: Checkout
Expand Down Expand Up @@ -203,3 +210,12 @@ jobs:
unity.log
!samples/IntegrationTest/Build/*_BackUpThisFolder_ButDontShipItWithYourGame
retention-days: 14

- name: Upload captured corpus
if: ${{ always() && inputs.capture }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: corpus-linux-${{ inputs.unity-version }}
path: test/IntegrationTest/capture/
if-no-files-found: warn
retention-days: 14
16 changes: 16 additions & 0 deletions .github/workflows/test-build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
unity-version:
required: true
type: string
capture:
required: false
type: boolean
default: false
description: "Capture the envelopes and debug files this job produces - see docs/envelope-capture.md"
secrets:
UNITY_LICENSE_SERVER_CONFIG:
required: true
Expand All @@ -24,6 +29,8 @@ jobs:
env:
UNITY_VERSION: ${{ inputs.unity-version }}
BUILD_PLATFORM: MacOS
# Empty unless a capture run was dispatched; see docs/envelope-capture.md.
SENTRY_CAPTURE_PATH: ${{ inputs.capture && format('test/IntegrationTest/capture/macos-{0}', inputs.unity-version) || '' }}

steps:
- name: Checkout
Expand Down Expand Up @@ -189,3 +196,12 @@ jobs:
unity.log
!samples/IntegrationTest/Build/*_BackUpThisFolder_ButDontShipItWithYourGame
retention-days: 14

- name: Upload captured corpus
if: ${{ always() && inputs.capture }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: corpus-macos-${{ inputs.unity-version }}
path: test/IntegrationTest/capture/
if-no-files-found: warn
retention-days: 14
16 changes: 16 additions & 0 deletions .github/workflows/test-build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
unity-version:
required: true
type: string
capture:
required: false
type: boolean
default: false
description: "Capture the envelopes and debug files this job produces - see docs/envelope-capture.md"
secrets:
UNITY_LICENSE_SERVER_CONFIG:
required: true
Expand All @@ -24,6 +29,8 @@ jobs:
env:
UNITY_VERSION: ${{ inputs.unity-version }}
BUILD_PLATFORM: Windows
# Empty unless a capture run was dispatched; see docs/envelope-capture.md.
SENTRY_CAPTURE_PATH: ${{ inputs.capture && format('test/IntegrationTest/capture/windows-{0}', inputs.unity-version) || '' }}

steps:
- name: Checkout
Expand Down Expand Up @@ -189,3 +196,12 @@ jobs:
unity.log
!samples/IntegrationTest/Build/*_BackUpThisFolder_ButDontShipItWithYourGame
retention-days: 14

- name: Upload captured corpus
if: ${{ always() && inputs.capture }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: corpus-windows-${{ inputs.unity-version }}
path: test/IntegrationTest/capture/
if-no-files-found: warn
retention-days: 14
16 changes: 16 additions & 0 deletions .github/workflows/test-compile-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
init-type:
required: true
type: string
capture:
required: false
type: boolean
default: false
description: "Capture the envelopes and debug files this job produces - see docs/envelope-capture.md"

defaults:
run:
Expand All @@ -20,6 +25,8 @@ jobs:
env:
UNITY_VERSION: ${{ inputs.unity-version }}
INIT_TYPE: ${{ inputs.init-type }}
# Empty unless a capture run was dispatched; see docs/envelope-capture.md.
SENTRY_CAPTURE_PATH: ${{ inputs.capture && format('test/IntegrationTest/capture/ios-{0}-{1}', inputs.unity-version, inputs.init-type) || '' }}

steps:
- name: Checkout
Expand Down Expand Up @@ -122,3 +129,12 @@ jobs:
name: build-size-iOS-${{ env.UNITY_VERSION }}
path: build-size-measurements/*.json
retention-days: 1

- name: Upload captured corpus
if: ${{ always() && inputs.capture }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: corpus-ios-${{ inputs.unity-version }}-${{ inputs.init-type }}
path: test/IntegrationTest/capture/
if-no-files-found: warn
retention-days: 14
16 changes: 16 additions & 0 deletions .github/workflows/test-run-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
init-type:
required: true
type: string
capture:
required: false
type: boolean
default: false
description: "Capture the envelopes and debug files this job produces - see docs/envelope-capture.md"
secrets:
SENTRY_AUTH_TOKEN:
required: true
Expand All @@ -32,6 +37,8 @@ jobs:
HOMEBREW_NO_INSTALL_CLEANUP: 1
SENTRY_DSN: ${{ secrets.SENTRY_TEST_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
# Empty unless a capture run was dispatched; see docs/envelope-capture.md.
SENTRY_CAPTURE_PATH: ${{ inputs.capture && format('test/IntegrationTest/capture/run-android-{0}-{1}-{2}', inputs.unity-version, inputs.api-level, inputs.init-type) || '' }}

steps:
- name: Checkout
Expand Down Expand Up @@ -181,3 +188,12 @@ jobs:
${{ env.ARTIFACTS_PATH }}
test/IntegrationTest/results/
retention-days: 14

- name: Upload captured corpus
if: ${{ always() && inputs.capture }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: corpus-run-android-${{ inputs.unity-version }}-${{ inputs.api-level }}-${{ inputs.init-type }}
path: test/IntegrationTest/capture/
if-no-files-found: warn
retention-days: 14
16 changes: 16 additions & 0 deletions .github/workflows/test-run-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ on:
type: string
default: ""
description: "macOS: native or cocoa. Windows: native or crashpad. Linux: native or breakpad."
capture:
required: false
type: boolean
default: false
description: "Capture the envelopes and debug files this job produces - see docs/envelope-capture.md"
secrets:
SENTRY_AUTH_TOKEN:
required: true
Expand All @@ -31,6 +36,8 @@ jobs:
env:
SENTRY_DSN: ${{ secrets.SENTRY_TEST_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
# Empty unless a capture run was dispatched; see docs/envelope-capture.md.
SENTRY_CAPTURE_PATH: ${{ inputs.capture && format('test/IntegrationTest/capture/run-{0}{1}-{2}', inputs.platform, inputs.backend && format('-{0}', inputs.backend) || '', inputs.unity-version) || '' }}

steps:
- name: Checkout
Expand Down Expand Up @@ -94,3 +101,12 @@ jobs:
path: |
test/IntegrationTest/results/
retention-days: 14

- name: Upload captured corpus
if: ${{ always() && inputs.capture }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: corpus-run-${{ inputs.platform }}${{ inputs.backend && format('-{0}', inputs.backend) || '' }}-${{ inputs.unity-version }}
path: test/IntegrationTest/capture/
if-no-files-found: warn
retention-days: 14
Loading
Loading