Skip to content

Release/2024/07/12 1 #50

Release/2024/07/12 1

Release/2024/07/12 1 #50

Workflow file for this run

name: Checking pull request gate pass
on:
pull_request:
branches:
- main
jobs:
open-ai-review:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Robin AI Reviewer
uses: Integral-Healthcare/robin-ai-reviewer@v1.0.4
with:
GITHUB_TOKEN: ${{ secrets.GA_TOKEN }}
OPEN_AI_API_KEY: ${{ secrets.OPEN_AI_API_KEY }}
lint-check:
name: Lint Check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: webfactory/ssh-agent@v0.5.4
with:
ssh-private-key: ${{ secrets.DUKA_MERCHANT_SDK_KEY }}
- uses: actions/checkout@v3
with:
token: ${{secrets.GA_TOKEN}}
submodules: recursive
lfs: false
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v3
with:
distribution: 'adopt-hotspot'
java-version: 17
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: gradle-${{ runner.os }}-${{ hashFiles('**/build.gradle') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Configure Keystore
run: |
echo "$ANDROID_KEYSTORE_FILE" > ./.buildsystem/keystore.jks.b64
base64 -d -i ./.buildsystem/keystore.jks.b64 > ./.buildsystem/keystore.jks
echo "storeFile=./.buildsystem/keystore.jks" >> ./.buildsystem/keystore.properties
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> ./.buildsystem/keystore.properties
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> ./.buildsystem/keystore.properties
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> ./.buildsystem/keystore.properties
env:
ANDROID_KEYSTORE_FILE: ${{ secrets.ANDROID_KEYSTORE_FILE }}
KEYSTORE_KEY_ALIAS: ${{ secrets.ANDROID_KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_KEY_PASSWORD }}
KEYSTORE_STORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_STORE_PASSWORD }}
- name: Lint checks
run: ./gradlew -Pci --console=plain lintDebug
spotless-check:
name: Spotless Check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: webfactory/ssh-agent@v0.5.4
with:
ssh-private-key: ${{ secrets.DUKA_MERCHANT_SDK_KEY }}
- uses: actions/checkout@v2.3.1
with:
token: ${{secrets.GA_TOKEN}}
submodules: recursive
lfs: false
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v1
with:
java-version: 17
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: gradle-${{ runner.os }}-${{ hashFiles('**/build.gradle') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Configure Keystore
run: |
echo "$ANDROID_KEYSTORE_FILE" > ./.buildsystem/keystore.jks.b64
base64 -d -i ./.buildsystem/keystore.jks.b64 > ./.buildsystem/keystore.jks
echo "storeFile=./.buildsystem/keystore.jks" >> ./.buildsystem/keystore.properties
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> ./.buildsystem/keystore.properties
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> ./.buildsystem/keystore.properties
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> ./.buildsystem/keystore.properties
env:
ANDROID_KEYSTORE_FILE: ${{ secrets.ANDROID_KEYSTORE_FILE }}
KEYSTORE_KEY_ALIAS: ${{ secrets.ANDROID_KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_KEY_PASSWORD }}
KEYSTORE_STORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_STORE_PASSWORD }}
- name: Spotless check
run: ./gradlew -Pci --console=plain spotlessCheck
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: webfactory/ssh-agent@v0.5.4
with:
ssh-private-key: ${{ secrets.DUKA_MERCHANT_SDK_KEY }}
- uses: actions/checkout@v2.3.1
with:
token: ${{secrets.GA_TOKEN}}
submodules: recursive
lfs: false
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v1
with:
java-version: 17
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: gradle-${{ runner.os }}-${{ hashFiles('**/build.gradle') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Configure Keystore
run: |
echo "$ANDROID_KEYSTORE_FILE" > ./.buildsystem/keystore.jks.b64
base64 -d -i ./.buildsystem/keystore.jks.b64 > ./.buildsystem/keystore.jks
echo "storeFile=./.buildsystem/keystore.jks" >> ./.buildsystem/keystore.properties
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> ./.buildsystem/keystore.properties
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> ./.buildsystem/keystore.properties
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> ./.buildsystem/keystore.properties
env:
ANDROID_KEYSTORE_FILE: ${{ secrets.ANDROID_KEYSTORE_FILE }}
KEYSTORE_KEY_ALIAS: ${{ secrets.ANDROID_KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_KEY_PASSWORD }}
KEYSTORE_STORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_STORE_PASSWORD }}
- name: Unit tests
run: ./gradlew -Pci --console=plain testDebugUnitTest
instrumented-tests:
name: Instrumentation tests
runs-on: macOS-10.15
timeout-minutes: 60
strategy:
fail-fast: true
matrix:
api-level: [29]
target: [google_apis]
steps:
- uses: webfactory/ssh-agent@v0.5.4
with:
ssh-private-key: ${{ secrets.DUKA_MERCHANT_SDK_KEY }}
- uses: actions/checkout@v2.3.1
with:
token: ${{secrets.GA_TOKEN}}
submodules: recursive
lfs: false
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v1
with:
java-version: 17
# Restore the cache.
# Intentionally don't set 'restore-keys' so the cache never contains redundant dependencies.
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: gradle-${{ runner.os }}-${{ hashFiles('**/build.gradle') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Configure Keystore
run: |
echo "$ANDROID_KEYSTORE_FILE" > ./.buildsystem/keystore.jks.b64
base64 -d -i ./.buildsystem/keystore.jks.b64 > ./.buildsystem/keystore.jks
echo "storeFile=../.buildsystem/keystore.jks" >> ./.buildsystem/keystore.properties
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> ./.buildsystem/keystore.properties
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> ./.buildsystem/keystore.properties
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> ./.buildsystem/keystore.properties
env:
ANDROID_KEYSTORE_FILE: ${{ secrets.ANDROID_KEYSTORE_FILE }}
KEYSTORE_KEY_ALIAS: ${{ secrets.ANDROID_KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_KEY_PASSWORD }}
KEYSTORE_STORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_STORE_PASSWORD }}
- name: Instrumentation tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: x86_64
profile: Nexus 6
script: ./gradlew :ui:connectedDebugAndroidTest --no-parallel