Skip to content

Commit

Permalink
Actions ios setup (#122)
Browse files Browse the repository at this point in the history
* Initial config for ios github actions.

* Split workflows and add additional steps.
  • Loading branch information
b4handjr authored Apr 22, 2024
1 parent f9ca817 commit 28fd8de
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ios_manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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
jobs:
iOS-klaatu-tests:
runs-on: macos-latest
name: iOS Klaatu Tests
steps:
- name: Clone firefox-ios repo
uses: actions/checkout@v4
with:
repository: jrbenny35/firefox-ios
ref: "github-actions-update"
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Build and setup app
run: |
cd firefox-ios
brew update
brew install node
pip3 install virtualenv pipenv
sh ./bootstrap.sh
- name: Run Tests
run: |
cd firefox-ios/firefox-ios-tests/Tests/ExperimentIntegrationTests
pipenv install
EXPERIMENT_NAME= ${{ inputs.user-facing-name }} pipenv run pytest --experiment ${{ inputs.slug }} -k test_generic.py
20 changes: 20 additions & 0 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,23 @@ jobs:
run: ./setup_script.sh
- name: Run Tests
run: tox -e bdd-tests -- --experiment-branch ${{ inputs.branch }} --experiment-slug ${{ inputs.slug }} --private-browsing-enabled
iOS-klaatu-tests:
runs-on: macos-latest
name: iOS Klaatu Tests
steps:
- name: Clone firefox-ios repo
uses: actions/checkout@v4
with:
repository: mozilla-mobile/firefox-ios
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Build and setup app
run: |
cd firefox-ios/firefox-ios
brew update
brew install node
pip3 install virtualenv
sh ./bootstrap.sh
79 changes: 79 additions & 0 deletions .github/workflows/windows_manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# This is a basic workflow that is manually triggered
name: Windows 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
env:
MOZ_HEADLESS: 1
jobs:
klaatu-tests:
runs-on: windows-latest
strategy:
matrix:
firefox: ['latest-beta', 'latest-nightly', 'latest' ]
name: windows-klaatu-firefox${{ matrix.firefox }}
steps:
- name: Setup firefox
id: setup-firefox
uses: browser-actions/setup-firefox@v1
with:
firefox-version: ${{ matrix.firefox }}
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: browser-actions/setup-geckodriver@latest
- name: Install Chocolatey
shell: pwsh
run: Set-ExecutionPolicy Bypass -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
- name: Install Dependencies
shell: pwsh
run: choco install jdk8 selenium
- name: Setup tests
shell: bash
run: ./setup_script.sh
- name: Run Tests
run: tox -e bdd-tests -- --experiment-branch ${{ inputs.branch }} --experiment-slug ${{ inputs.slug }} --private-browsing-enabled
iOS-klaatu-tests:
runs-on: macos-latest
name: iOS Klaatu Tests
steps:
- name: Clone firefox-ios repo
uses: actions/checkout@v4
with:
repository: jrbenny35/firefox-ios
ref: "github-actions-update"
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Build and setup app
run: |
cd firefox-ios
brew update
brew install node
pip3 install virtualenv pipenv
sh ./bootstrap.sh
- name: Run Tests
run: |
cd firefox-ios/firefox-ios-tests/Tests/ExperimentIntegrationTests
pipenv install
EXPERIMENT_NAME="iOS Felt Privacy - Simplified Nav and Felt Deletion v2" pipenv run pytest --experiment ${{ inputs.slug }} -k test_generic.py

0 comments on commit 28fd8de

Please sign in to comment.