Skip to content

Merge pull request #116 from xmtp/np/read-receipts #250

Merge pull request #116 from xmtp/np/read-receipts

Merge pull request #116 from xmtp/np/read-receipts #250

Workflow file for this run

name: Android Tests
on:
push:
branches:
- main
pull_request:
env:
GPR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPR_USER: ${{ secrets.GITHUB_ACTOR }}
defaults:
run:
working-directory: ./example
jobs:
android-tests:
name: Android Tests
runs-on: macos-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup Node.js
uses: actions/setup-node@v3
- name: Install dependencies
run: npm i --force
- name: Install React Native CLI
run: npm i -g react-native-cli --force
# Workaround for https://github.com/actions/runner-images/issues/8104
- name: Fix Qemu Error
run: |
brew remove --ignore-dependencies qemu
curl -o ./qemu.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/f88e30b3a23ef3735580f9b05535ce5a0a03c9e3/Formula/qemu.rb
brew install ./qemu.rb
- name: Install docker
run: brew install docker docker-compose
- name: Start colima
run: colima start
- name: Start local test server
run: docker-compose -p xmtp -f dev/local/docker-compose.yml up -d
- name: Gradle Run Integration Tests
uses: reactivecircus/android-emulator-runner@v2
with:
working-directory: ./example
api-level: 29
script: |
react-native run-android
sleep 15
cd android && ./gradlew connectedCheck
- name: Stop local test server
run: docker-compose -p xmtp -f dev/local/docker-compose.yml down