Skip to content

iOS Klaatu Tests

iOS Klaatu Tests #48

Workflow file for this run

# This is a basic workflow that is manually triggered
name: iOS Klaatu Tests
on:
workflow_dispatch:
inputs:
branch:
description: 'Experiment Branch'
default: 'control'
required: true
type: string
slug:
description: 'Experiment Slug'
default: 'an-awesome-experiment'
required: true
type: string
user-facing-name:
description: 'The user facing name'
default: "An Awesome Experiment"
required: false
type: string
firefox-version:
description: 'The Firefox Version you want to test'
default: "123"
required: false
type: string
jobs:
iOS-klaatu-tests:
runs-on: macos-14-xlarge
name: iOS Klaatu Tests
steps:
- name: Clone firefox-ios repo
uses: actions/checkout@v4
with:
repository: mozilla/firefox-ios
ref: "release/v${{ inputs.firefox-version }}"
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Cache
uses: actions/[email protected]
with:
path: /Users/runner/Library/Developer/Xcode/DerivedData/**/
key: xcode-firefox-v${{ inputs.firefox-version }}-cache
- name: Delete Xcode App
run: sudo rm -rf /Applications/Xcode.app
- name: Set Xcode version
run: sudo xcode-select -switch /Applications/Xcode_15.3.app && xcodebuild -version
- name: Setup build
run: |
sh ./bootstrap.sh
cd firefox-ios
brew update
pip3 install virtualenv pipenv
- name: Build app
run: |
cd firefox-ios
xcodebuild build-for-testing -project Client.xcodeproj -scheme Fennec -configuration Fennec -sdk iphonesimulator -quiet -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.2'
- name: Install Nimbus CLI
run: curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/mozilla/application-services/main/install-nimbus-cli.sh | bash
- name: Clone firefox-ios repo
uses: actions/checkout@v4
with:
repository: jrbenny35/firefox-ios
ref: "github-actions-update"
- name: Run Tests
run: |
cd firefox-ios/firefox-ios-tests/Tests/ExperimentIntegrationTests
pipenv install
export SIMULATOR_UDID=$(python get_specific_device_udid.py)
echo "RUNNING TESTS"
EXPERIMENT_NAME="${{ inputs.user-facing-name }}" pipenv run pytest --experiment ${{ inputs.slug }} -k test_generic.py
- name: Archive Results
if: ${{ always() }}
run: zip -r results.zip /Users/runner/Library/Developer/Xcode/DerivedData/**/Logs/Test/*.xcresult
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: xctest-results
path: results.zip
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: HTML Test Report
path: /Users/runner/work/klaatu/klaatu/firefox-ios/firefox-ios-tests/Tests/ExperimentIntegrationTests/results/index.html
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: xcodebuild.log
path: /private/var/folders/3m/**/T/pytest-of-runner/pytest-*/logs0/xcodebuild.log