QA Tests #865
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: QA Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 12 * * *' # Run every day at 7/8 AM Eastern | |
env: | |
DEVELOPER_DIR: '/Applications/Xcode_14.3.1.app/Contents/Developer' | |
jobs: | |
CI: | |
runs-on: macos-13 | |
env: | |
# Avoid concurrency issues | |
BROWSERSTACK_CUSTOM_ID: ${{ (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch') && format('pr-{0}', github.sha) || 'iOSApp' }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up env | |
run: | | |
cd Sample/ | |
brew install xcodesorg/made/xcodes | |
bundle install | |
- name: Install the Apple certificate and provisioning profile and build app | |
env: | |
MATCH_KEY_ID: ${{ secrets.MATCH_KEY_ID }} | |
MATCH_ISSUER_ID: ${{ secrets.MATCH_ISSUER_ID }} | |
MATCH_P8: ${{ secrets.MATCH_P8 }} | |
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }} | |
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} | |
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | |
BROWSERSTACK_CUSTOM_ID: ${{ env.BROWSERSTACK_CUSTOM_ID }} | |
run: | | |
cd Sample/ | |
bundle exec fastlane build_ci_app | |
- name: Checkout Integration Test Repo | |
uses: actions/checkout@v3 | |
with: | |
repository: teamforage/mobile-qa-tests | |
ref: main | |
ssh-key: ${{ secrets.MOBILE_QA_DEPLOY_KEY }} | |
path: 'mobile-qa-tests/' | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Run Integration Tests | |
env: | |
BROWSERSTACK_CUSTOM_ID: ${{ env.BROWSERSTACK_CUSTOM_ID }} | |
run: | | |
cd mobile-qa-tests | |
pip3 install -r requirements.txt | |
export BROWSERSTACK_CUSTOM_ID=${{ env.BROWSERSTACK_CUSTOM_ID }} | |
pytest ios/tests/test_basic_flow.py || true | |
pytest --lf --last-failed-no-failures none --suppress-no-test-exit-code ios/tests/test_basic_flow.py |