Skip to content

CI

CI #606

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 12 * * *' # Run every day at 7/8 AM Eastern
jobs:
CI:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run unit tests for the debug build
run: ./gradlew testDebugUnitTest --stacktrace
- name: Build release and debug variants
run: ./gradlew assemble --stacktrace
- name: Upload App to BrowserStack
run: |
curl -u "${{ secrets.BROWSERSTACK_USERNAME }}:${{ secrets.BROWSERSTACK_ACCESS_KEY }}" -X POST \
https://api-cloud.browserstack.com/app-automate/upload \
-F "file=@${{ github.workspace }}/sample-app/build/outputs/apk/debug/sample-app-debug.apk" \
-F "custom_id=AndroidApp"
- 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: Run Integration Tests
run: |
cd mobile-qa-tests
pip install -r requirements.txt
pytest android/tests/test_basic_flow.py || true
pytest --lf --last-failed-no-failures none --suppress-no-test-exit-code android/tests/test_basic_flow.py
- name: Upload build outputs (APKs and SDK AARs)
uses: actions/upload-artifact@v3
with:
name: build-outputs
path: |
sample-app/build/outputs/
forage-android/build/outputs/