Skip to content

fix build pipeline

fix build pipeline #88

Workflow file for this run

name: Frontegg Android SDK
on:
push:
branches-ignore:
- master
env:
CI: true
LANG: en_US.UTF-8
API_LEVEL: 29
concurrency:
group: ci-push-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
name: Build And Test
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# - name: Clone Mock Server
# uses: actions/checkout@v3
# with:
# repository: frontegg/frontegg-mock-server
# ssh-key: ${{ secrets.MOCK_SERVER_SSH_KEY }}
# ref: "master"
# path: mocker
# - name: Install Mock Server
# working-directory: mocker
# run: yarn install
# - name: Run Mock Server
# working-directory: mocker
# env:
# ANDROID_ASSOCIATED_DOMAIN_GRADLE_PATH: "${{ github.workspace }}/app/build.gradle"
# SERVER_HOSTNAME: "10.0.2.2"
# NGROCK_AUTH_TOKEN: "${{ secrets.NGROCK_AUTH_TOKEN }}"
# NGROCK_SUBDOMAIN: "frontegg-test"
# run: |
# echo "ANDROID_ASSOCIATED_DOMAIN_GRADLE_PATH: $ANDROID_ASSOCIATED_DOMAIN_GRADLE_PATH"
# echo "SERVER_HOSTNAME: $SERVER_HOSTNAME"
# echo "NGROCK_SUBDOMAIN: $NGROCK_SUBDOMAIN"
# (yarn start:mobile-mock&)
# sleep 40
- name: Set git config
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
- name: Setup JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
settings-path: ${{ github.workspace }} # location for the settings.xml file
distribution: temurin
- name: Gradle cache
uses: gradle/gradle-build-action@v2
- name: Build Libraries
run: ./gradlew :app:build --no-daemon
# - name: AVD cache
# uses: actions/cache@v3
# id: avd-cache
# with:
# path: |
# ~/.android/avd/*
# ~/.android/adb*
# key: avd-${{env.API_LEVEL}}
#
# - name: Create AVD and generate snapshot for caching
# if: steps.avd-cache.outputs.cache-hit != 'true'
# uses: reactivecircus/android-emulator-runner@v2
# with:
# avd-name: "AndroidEmulator"
# api-level: ${{env.API_LEVEL}}
# force-avd-creation: false
# emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
# disable-animations: true
# script: echo "Generated AVD snapshot for caching."
# - name: Run tests
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: ${{env.API_LEVEL}}
# force-avd-creation: false
# emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
# disable-animations: true
# script: ./run-tests.sh
#
# - name: Upload test results
# if: always()
# uses: actions/upload-artifact@v2
# with:
# name: test-results
# path: app/build/reports/androidTests/connected/