Merge branch 'main' into PP-641-handle-ui-small-devices #316
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: Check Merchant SDK | |
on: | |
push: | |
paths: | |
- 'merchant-sdk/**' | |
- 'internal-payment-sdk/**' | |
- 'health-api-library/**' | |
- 'core-api-library/**' | |
- 'gradle/**' | |
branches: | |
- '**' | |
tags-ignore: | |
- '**' | |
pull_request: | |
types: [opened, edited, reopened] | |
paths: | |
- 'merchant-sdk/**' | |
- 'internal-payment-sdk/**' | |
- 'health-api-library/**' | |
- 'core-api-library/**' | |
- 'gradle/**' | |
workflow_call: | |
secrets: | |
GINI_MOBILE_TEST_CLIENT_SECRET: | |
required: true | |
MERCHANT_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD: | |
required: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: run unit tests | |
run: ./gradlew merchant-sdk:sdk:testDebugUnitTest | |
- name: archive unit test results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: merchant-sdk-unit-test-results | |
path: merchant-sdk/sdk/build/reports/tests | |
build-example-app: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: build release example app for QA | |
run: > | |
./gradlew merchant-sdk:example-app:assembleQaRelease | |
-PclientId="gini-mobile-test" | |
-PclientSecret="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}" | |
-PreleaseKeystoreFile="merchant_sdk_example.jks" | |
-PreleaseKeystorePassword='${{ secrets.MERCHANT_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}' | |
-PreleaseKeyAlias="merchant_sdk_example" | |
-PreleaseKeyPassword='${{ secrets.MERCHANT_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}' | |
- name: archive release example app for QA | |
uses: actions/upload-artifact@v4 | |
with: | |
name: merchant-sdk-example-app-qa-release | |
path: merchant-sdk/example-app/build/outputs/apk/qa/release | |
- name: build release example app for production | |
run: > | |
./gradlew merchant-sdk:example-app:assembleProdRelease | |
-PclientId="gini-mobile-test" | |
-PclientSecret="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}" | |
-PreleaseKeystoreFile="merchant_sdk_example.jks" | |
-PreleaseKeystorePassword='${{ secrets.MERCHANT_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}' | |
-PreleaseKeyAlias="merchant_sdk_example" | |
-PreleaseKeyPassword='${{ secrets.MERCHANT_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}' | |
- name: archive release example app for production | |
uses: actions/upload-artifact@v4 | |
with: | |
name: merchant-sdk-example-app-prod-release | |
path: merchant-sdk/example-app/build/outputs/apk/prod/release | |
android-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: run android lint | |
run: ./gradlew merchant-sdk:sdk:lint | |
- name: archive android lint report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: merchant-sdk-android-lint-report | |
path: merchant-sdk/sdk/build/reports/lint-results*.html | |
detekt: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: run detekt | |
run: ./gradlew merchant-sdk:sdk:detekt | |
- name: archive detekt report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: merchant-sdk-detekt-report | |
path: merchant-sdk/sdk/build/reports/detekt/*.html | |
ktlint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: run ktlint | |
run: ./gradlew merchant-sdk:sdk:ktlintCheck | |
- name: archive ktlint report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: merchant-sdk-ktlint-report | |
path: merchant-sdk/sdk/build/reports/ktlint/**/*.html |