Handle missing flags in a valid JSON configuration request #69
Workflow file for this run
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: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- '**/*' | |
jobs: | |
test-android-sdk: | |
runs-on: macos-latest | |
steps: | |
- name: Check out Java SDK | |
uses: actions/checkout@v3 | |
with: | |
repository: 'Eppo-exp/android-sdk' | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: 'Set up GCP SDK' | |
uses: 'google-github-actions/setup-gcloud@v0' | |
- name: Restore gradle.properties | |
env: | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
shell: bash | |
run: | | |
mkdir -p ~/.gradle/ | |
echo "GRADLE_USER_HOME=${HOME}/.gradle" >> $GITHUB_ENV | |
echo "MAVEN_USERNAME=${MAVEN_USERNAME}" > ~/.gradle/gradle.properties | |
echo "MAVEN_PASSWORD=${MAVEN_PASSWORD}" >> ~/.gradle/gradle.properties | |
- name: Set up test data | |
run: make test-data | |
- name: Wait for mock RAC DNS to resolve | |
run: | | |
for i in {1..15} | |
do | |
ip=$(dig +short us-central1-eppo-prod-312905.cloudfunctions.net) | |
if [[ -n "$ip" ]]; then | |
echo "Domain resolved to $ip after $i seconds" | |
exit 0 | |
fi | |
sleep 1 | |
done | |
echo "Failed to resolve after 15 seconds" | |
exit 1 | |
- name: Spin up emulator and run tests | |
id: testing | |
uses: ReactiveCircus/android-emulator-runner@v2 | |
with: | |
api-level: 33 | |
target: google_apis | |
arch: x86_64 | |
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -netdelay none -netspeed full -dns-server 8.8.8.8 | |
script: | | |
echo "Emulator started" | |
adb logcat -c # clear logs | |
mkdir -p app/ # create directory | |
touch app/emulator.log # create log file | |
chmod 777 app/emulator.log # allow writing to log file | |
adb logcat | grep EppoSDK >> app/emulator.log & # pipe all logcat messages into log file as a background process | |
./gradlew connectedCheck # run tests | |
- name: Upload Emulator Logs | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: emulator logs | |
path: app/emulator.log | |
- name: Upload Test Report | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: report | |
path: /Users/runner/work/android-sdk/android-sdk/eppo/build/reports/androidTests/connected/index.html |