Skip to content

Commit

Permalink
chore: build and test ios
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-yangy committed Nov 15, 2024
1 parent b459f61 commit afef0a6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ jobs:
- targetPlatform: Android
runs-on: [ self-hosted, macOS ]
test_script: browserstack-sdk pytest -s ./test/test_android.py --browserstack.config "browserstack.android.yml"
- targetPlatform: iOS
runs-on: [ self-hosted, macOS ]
test_script: browserstack-sdk pytest -s ./test/test_ios.py --browserstack.config "browserstack.ios.yml"
concurrency:
group: test-${{ matrix.targetPlatform }}
runs-on: ${{ matrix.runs-on }}
Expand All @@ -98,4 +95,26 @@ jobs:
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
working-directory: sample/Tests
run: ${{ matrix.test_script }}
test-ios:
name: Run iOS UI tests 🧪
runs-on: [ self-hosted, macOS ]
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: build iOS app
working-directory: sample
run: ./build_ios.sh
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: pip install -r "sample/Tests/requirements.txt"
- name: Run UI tests
env:
MAILSLURP_API_KEY: ${{ secrets.MAILSLURP_API_KEY }}
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
working-directory: sample/Tests
run: browserstack-sdk pytest -s ./test/test_ios.py --browserstack.config "browserstack.ios.yml"

Binary file removed sample/Tests/Payload.ipa
Binary file not shown.
2 changes: 1 addition & 1 deletion sample/Tests/browserstack.ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ source: pytest-browserstack:sample-sdk:v1.0
# Set `app` to define the app that is to be used for testing.
# It can either take the id of any uploaded app or the path of the app directly.
#app: ./WikipediaSample.apk
app: ./Payload.ipa #For running local tests
app: ../build/output/iOS/IPA/Payload.ipa #For running local tests

# =======================================
# Platforms (Browsers / Devices to test)
Expand Down

0 comments on commit afef0a6

Please sign in to comment.