on:
  push:
    branches: [main]
name: CI
jobs:
  setup-android:
    runs-on: ubuntu-latest
    steps:

      -  uses: actions/checkout@v3
      -  uses: actions/setup-java@v3
         with:
           distribution: "zulu"
           java-version: 17

      - name: Setup middleware dependency
        env:
          token_secret: ${{ secrets.ANYTYPE_SECRET }}
          user_secret: ${{ secrets.ANYTYPE_USER_SECRET }}
          amplitude_secret: ${{ secrets.ANYTYPE_AMPLITUDE_SECRET }}
          amplitude_secret_debug: ${{ secrets.ANYTYPE_AMPLITUDE_DEBUG_SECRET }}
          sentry_dsn_secret: ${{ secrets.ANYTYPE_SENTRY_DSN_SECRET }}
        run: ./middleware2.sh $token_secret $user_secret $amplitude_secret $amplitude_secret_debug $sentry_dsn_secret

      - name: Run unit tests. Full mode.
        run: ./gradlew build test -Dpre-dex=false -q