-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into test-automation
- Loading branch information
Showing
764 changed files
with
23,826 additions
and
1,446 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
name: Check Merchant SDK | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'merchant-sdk/**' | ||
- 'health-api-library/**' | ||
- 'core-api-library/**' | ||
- 'gradle/**' | ||
branches: | ||
- '**' | ||
tags-ignore: | ||
- '**' | ||
pull_request: | ||
types: [opened, edited, reopened] | ||
paths: | ||
- 'merchant-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@v3 | ||
|
||
- name: setup java | ||
uses: actions/setup-java@v3 | ||
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@v3 | ||
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@v3 | ||
|
||
- uses: actions/setup-java@v3 | ||
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@v3 | ||
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@v3 | ||
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@v3 | ||
|
||
- uses: actions/setup-java@v3 | ||
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@v3 | ||
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@v3 | ||
|
||
- uses: actions/setup-java@v3 | ||
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@v3 | ||
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@v3 | ||
|
||
- uses: actions/setup-java@v3 | ||
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@v3 | ||
with: | ||
name: merchant-sdk-ktlint-report | ||
path: merchant-sdk/sdk/build/reports/ktlint/**/*.html |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Build docs for Merchant SDK | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'merchant-sdk/**' | ||
branches: | ||
- '**' | ||
tags-ignore: | ||
- '**' | ||
pull_request: | ||
types: [opened, edited, reopened] | ||
paths: | ||
- 'merchant-sdk/**' | ||
|
||
jobs: | ||
build-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: setup java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'gradle' | ||
|
||
- name: setup python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 'pypy2.7' | ||
|
||
- name: setup ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.2.0' | ||
bundler-cache: true | ||
|
||
- name: build documentation | ||
uses: maierj/[email protected] | ||
with: | ||
lane: 'build_documentation' | ||
options: > | ||
{ | ||
"project_id": "merchant-sdk", | ||
"module_id": "sdk" | ||
} | ||
- name: archive documentation | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: merchant-sdk-documentation | ||
path: merchant-sdk/sdk/build/docs |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Release docs for Merchant SDK | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'merchant-sdk;[0-9]+.[0-9]+.[0-9]+;doc**' | ||
- 'merchant-sdk;[0-9]+.[0-9]+.[0-9]+-beta[0-9][0-9];doc**' | ||
workflow_call: | ||
secrets: | ||
RELEASE_GITHUB_USER: | ||
required: true | ||
RELEASE_GITHUB_PASSWORD: | ||
required: true | ||
|
||
jobs: | ||
release-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: get branch name | ||
id: branch | ||
shell: bash | ||
run: | | ||
# Get the branch ref that contains the tag in github.ref | ||
# (github.ref contains the tag because this workflow is triggered by tags: | ||
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context) | ||
branch_ref=$(git branch -r --contains "${{ github.ref }}") | ||
# Remove "origin/" prefix from branch_ref and trim whitespace | ||
branch_name=$(echo ${branch_ref/origin\/} | tr -d '[:space:]') | ||
echo "::set-output name=branch_name::$branch_name" | ||
echo "branch_name: $branch_name" | ||
- name: setup java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'gradle' | ||
|
||
- name: setup python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 'pypy2.7' | ||
|
||
- name: setup ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.2.0' | ||
bundler-cache: true | ||
|
||
- name: release documentation | ||
uses: maierj/[email protected] | ||
with: | ||
lane: 'release_documentation' | ||
options: > | ||
{ | ||
"project_id": "merchant-sdk", | ||
"module_id": "sdk", | ||
"documentation_title": "Gini Merchant SDK for Android", | ||
"is_stable_release": "${{ steps.branch.outputs.branch_name == 'main' }}", | ||
"git_tag": "${{ github.ref }}", | ||
"ci": "true", | ||
"git_user": "${{ secrets.RELEASE_GITHUB_USER }}", | ||
"git_password": "${{ secrets.RELEASE_GITHUB_PASSWORD }}" | ||
} | ||
- name: archive documentation | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: merchant-sdk-documentation | ||
path: merchant-sdk/sdk/build/docs |
Oops, something went wrong.