Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 10 additions & 8 deletions .github/actions/prepare-testing/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ inputs:
arch:
description: Architecture to use for testing.
required: true
android:
description: Whether to prepare for Android testing.
default: "false"
export-platform:
description: Which export template will be used, lowercase (e.g., android, ios).
required: false
default: ""

runs:
using: "composite"
Expand All @@ -34,7 +35,7 @@ runs:
scons --version

- name: Set up Java 17
if: inputs.android == 'true'
if: inputs.export-platform == 'android'
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: temurin
Expand Down Expand Up @@ -133,8 +134,8 @@ runs:
shell: bash
run: cp exports/export_presets.cfg project/export_presets.cfg

- name: Deploy Android build template
if: inputs.android == 'true'
- name: Download export templates
if: inputs.export-platform != ''
shell: bash
run: |
# Download Godot templates
Expand All @@ -143,8 +144,9 @@ runs:
echo "Downloading templates from: $url"
curl -L -o templates.zip "${url}"

echo "Extracting Android source template..."
unzip -j templates.zip templates/android_source.zip -d exports/
echo "Extracting export templates..."
mkdir -p exports/templates
unzip -j templates.zip -d exports/templates
rm templates.zip

- name: Prepare project
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
timeout-minutes: 15
with:
arch: x86_64
android: true
export-platform: "android"

# Needed for Android emulator
- name: Enable KVM
Expand Down
33 changes: 28 additions & 5 deletions .github/workflows/test_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,35 @@ jobs:
- test-platform: Linux
runner: ubuntu-latest
godot-arch: x86_64

- test-platform: Linux
runner: ubuntu-latest
godot-arch: x86_32

- test-platform: Windows
runner: windows-latest
godot-arch: x86_64

- test-platform: Windows
runner: windows-latest
godot-arch: x86_32

- test-platform: macOS
runner: macos-latest
godot-arch: universal

- test-platform: AndroidSauceLabs
runner: ubuntu-latest
godot-arch: x86_64
test-executable: ./exports/android.apk
export-platform: android

- test-platform: iOSSauceLabs
runner: macos-latest
godot-arch: universal
test-executable: ./exports/ios/ios.ipa
export-platform: ios

steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand All @@ -51,21 +64,31 @@ jobs:
timeout-minutes: 15
with:
arch: ${{ matrix.godot-arch }}
android: ${{ matrix.test-platform == 'AndroidSauceLabs' && 'true' || 'false' }}
export-platform: ${{ matrix.export-platform }}

- name: Export project
if: matrix.test-platform == 'AndroidSauceLabs'
- name: Export project on Android
if: matrix.export-platform == 'android'
timeout-minutes: 10
shell: bash
run: |
"${GODOT}" --verbose --headless --disable-crash-handler --path project --install-android-build-template --export-debug "Android Tests" "${GITHUB_WORKSPACE}/exports/android.apk" || true
"${GODOT}" --verbose --headless --disable-crash-handler --path project --install-android-build-template --export-debug "Android Tests" "${{github.workspace}}/${{matrix.test-executable}}" || true

- name: Export project on iOS
if: matrix.export-platform == 'ios'
timeout-minutes: 10
shell: bash
run: |
mkdir -p "$(dirname "${{github.workspace}}/${{matrix.test-executable}}")"

# Export is expected to fail, because Godot will try to build Xcode project.
"${GODOT}" --verbose --headless --disable-crash-handler --path project --export-debug "iOS Tests" "${{github.workspace}}/${{matrix.test-executable}}" || true

- name: Run integration tests
shell: pwsh
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_API_TOKEN }}
SENTRY_TEST_PLATFORM: ${{ matrix.test-platform }}
SENTRY_TEST_EXECUTABLE: ${{ matrix.test-executable }}
SENTRY_TEST_EXECUTABLE: ${{matrix.test-executable}}
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
SAUCE_REGION: us-west-1
Expand Down
Loading
Loading