Skip to content

E2E tests

E2E tests #1577

Workflow file for this run

name: E2E tests
on:
workflow_dispatch:
workflow_call:
env:
XCODE_VERSION: '16.2'
jobs:
generate-xcode-project:
if: ${{ github.event.workflow == '.github/workflows/e2e.yml'}}
uses: ./.github/workflows/generate-xcode-project.yml
e2e:
# We must ensure the xcode project file is uploaded before proceeding
needs: generate-xcode-project
if: always()
name: E2E tests
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Select Xcode version
run: sudo xcode-select -s '/Applications/Xcode_${{ env.XCODE_VERSION }}.app/Contents/Developer'
- name: Download xcode project file
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: output-xcodeproj-file
path: ./Bucketeer.xcodeproj
# Get macOS version for cache key
- name: Get macOS version
id: macos-version
run: |
VERSION=$(sw_vers -productVersion | cut -d. -f1,2)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Running on macOS $VERSION"
# Cache Xcode DerivedData and SPM dependencies
- name: Cache build artifacts
id: cache-build
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: |
~/Library/Developer/Xcode/DerivedData
~/.swiftpm
~/Library/Caches/org.swift.swiftpm
~/Library/Caches/com.apple.dt.Xcode
key: ${{ runner.os }}-${{ steps.macos-version.outputs.version }}-xcode-${{ env.XCODE_VERSION }}-${{ hashFiles('**/Package.swift', '**/Bucketeer.xcodeproj/project.pbxproj') }}-${{ hashFiles('**/*.swift') }}
restore-keys: |
${{ runner.os }}-${{ steps.macos-version.outputs.version }}-xcode-${{ env.XCODE_VERSION }}-${{ hashFiles('**/Package.swift', '**/Bucketeer.xcodeproj/project.pbxproj') }}-
${{ runner.os }}-${{ steps.macos-version.outputs.version }}-xcode-${{ env.XCODE_VERSION }}-
- name: Verify iPhone simulators
run: |
echo "Available iPhone simulators:"
xcrun simctl list devices available | grep "iPhone" || echo "No iPhone simulators found!"
- name: Download environment file
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: output-environment-file
path: ./environment.xcconfig
- name: Build for testing
run: make build-for-testing
- name: E2E Test
env:
E2E_API_ENDPOINT: ${{ secrets.E2E_API_ENDPOINT }}
E2E_API_KEY: ${{ secrets.E2E_API_KEY }}
run: |
# Run E2E tests with xcbeautify
set -o pipefail && make e2e-without-building | xcbeautify --renderer github-actions