Skip to content

Commit

Permalink
Merge branch 'main' into EC-104-android-base-payment-lib
Browse files Browse the repository at this point in the history
* main: (178 commits)
  feat(health-sdk): Bump version to 4.4.0
  feat(health-api-library): Bump version to 4.4.0
  ci: Remove push trigger on gpc app PM-117
  feat(bank-sdk): Add bank icon for gpc module PM-119
  ci: Add workflow for gini payment controller PM-117
  feature(bank-sdk): Transaction Docs. Added delete button at Invoice Preview screen
  feature(bank-sdk): Transaction Docs. Added delete button at Invoice Preview screen
  fix(capture-sdk): Make sure that frame will not be closed before all image detection finished PP-823
  feat(bank-sdk): Bump version to 3.14.0
  feat(capture-sdk): Bump version to 3.12.0
  feat(bank-api-library): Bump version to 3.3.0
  feature(bank-sdk): Transaction Docs. Code refactor
  feat(health-sdk): Doc fix
  feat(health-sdk): Example app update to show medical provider on invoice list
  feat(health-sdk): Made specific extractions public so doctor's name could be reached
  feature(bank-sdk): Transaction Docs. Code refactor
  feature(bank-sdk): Transaction Docs. Added backward compability constructors
  feature(bank-sdk): Transaction Docs. Removed useless library
  feature(bank-sdk): Transaction Docs. Tests fix
  feature(bank-sdk): Transaction Docs. Unit test fix
  ...

# Conflicts:
#	RELEASE-ORDER.md
#	internal-payment-sdk/sdk/src/main/java/net/gini/android/internal/payment/bankselection/BankSelectionBottomSheet.kt
  • Loading branch information
llevente committed Oct 17, 2024
2 parents aebfc1a + 1ce20c4 commit 2c316d6
Show file tree
Hide file tree
Showing 300 changed files with 10,581 additions and 1,214 deletions.
42 changes: 42 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: 2
updates:

- package-ecosystem: "gradle"
directory: "/bank-api-library/library"
schedule:
interval: "daily"

- package-ecosystem: "gradle"
directory: "/bank-sdk/sdk"
schedule:
interval: "daily"

- package-ecosystem: "gradle"
directory: "/capture-sdk/sdk"
schedule:
interval: "daily"

- package-ecosystem: "gradle"
directory: "/capture-sdk/default-network"
schedule:
interval: "daily"

- package-ecosystem: "gradle"
directory: "/core-api-library/library"
schedule:
interval: "daily"

- package-ecosystem: "gradle"
directory: "/health-api-library/library"
schedule:
interval: "daily"

- package-ecosystem: "gradle"
directory: "/health-sdk/sdk"
schedule:
interval: "daily"

- package-ecosystem: "gradle"
directory: "/merchant-sdk/sdk"
schedule:
interval: "daily"
63 changes: 63 additions & 0 deletions .github/workflows/bank-sdk.publish.example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Publish Bank SDK Example App QA Build to App Center

on:
workflow_dispatch:
push:
paths:
- 'bank-sdk/**'
- 'capture-sdk/**'
- 'bank-api-library/**'
- 'core-api-library/**'
- 'gradle/**'

jobs:
check:
uses: ./.github/workflows/bank-sdk.check.yml
secrets:
GINI_MOBILE_TEST_CLIENT_SECRET: ${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}
BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD: ${{ secrets.BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}

publish_to_app_center:
needs: check
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 ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.0'
bundler-cache: true

- name: build release example app for QA
run: >
./gradlew bank-sdk:example-app:assembleQaExampleAppRelease
-PclientId="gini-mobile-test"
-PclientSecret="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}"
-PreleaseKeystoreFile="screen_api_example.jks"
-PreleaseKeystorePassword='${{ secrets.BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}'
-PreleaseKeyAlias="screen_api_example"
-PreleaseKeyPassword='${{ secrets.BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}'
- name: Install appcenter-cli
run: >
npm install -g appcenter-cli
- name: Distribute Bank-sdk example apk to App Center
uses: akiojin/appcenter-distribute-github-action@v1.4.11
with:
token: ${{ secrets.GINI_BANK_SDK_EXAMPLE_APPCENTER_API_TOKEN }}
path: bank-sdk/example-app/build/outputs/apk/qaExampleApp/release/example-app-qa-exampleApp-release.apk
app: Gini-Team-Organization/Screen-API-Example-Gini-Pay-Bank-SDK
group: 'Internal'
release_notes: |
${{ format('{{ {0} {1} }}', github.ref, github.sha) }}
${{ github.event.head_commit.message }}
66 changes: 66 additions & 0 deletions .github/workflows/bank-sdk.publish.firebase.example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Publish Bank SDK Example App QA Build to Firebase distribution

on:
workflow_dispatch:
push:
paths:
- 'bank-sdk/**'
- 'capture-sdk/**'
- 'bank-api-library/**'
- 'core-api-library/**'
- 'gradle/**'

jobs:
check:
uses: ./.github/workflows/bank-sdk.check.yml
secrets:
GINI_MOBILE_TEST_CLIENT_SECRET: ${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}
BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD: ${{ secrets.BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}

publish_to_firebase_distribution:
needs: check
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 ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.0'
bundler-cache: true

- name: build release example app for QA
run: >
./gradlew bank-sdk:example-app:assembleQaExampleAppRelease
-PclientId="gini-mobile-test"
-PclientSecret="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}"
-PreleaseKeystoreFile="screen_api_example.jks"
-PreleaseKeystorePassword='${{ secrets.BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}'
-PreleaseKeyAlias="screen_api_example"
-PreleaseKeyPassword='${{ secrets.BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}'
- name: Check file existence
uses: andstor/file-existence-action@v3
with:
files: "./bank-sdk/example-app/build/outputs/apk/qaExampleApp/release/example-app-qa-exampleApp-release.apk"
fail: true

- name: Distribute Health-sdk example apk to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{secrets.GINI_BANK_SDK_EXAMPLE_APP_FIREBASE_ID}}
serviceCredentialsFileContent: ${{ secrets.FIREBASE_CREDENTIAL_FILE_CONTENT }}
groups: testers
file: bank-sdk/example-app/build/outputs/apk/qaExampleApp/release/example-app-qa-exampleApp-release.apk
releaseNotes: |
${{ format('{{ {0} {1} }}', github.ref, github.sha) }}
${{ github.event.head_commit.message }}
65 changes: 65 additions & 0 deletions .github/workflows/generate-sboms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,68 @@ jobs:
with:
name: CycloneDX SBOM JSONs
path: sbom-jsons.zip

# Step 2: Loop over each SBOM file and submit it
- name: Submit SBOMs to GitHub Dependency Graph
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_PASSWORD }}
run: |
sha=$(git rev-parse HEAD)
timestamp=$(date +%s)
correlatorName="${timestamp}_${GITHUB_WORKFLOW}"
json_sboms=(
"core-api-library/library/build/reports/gini-internal-core-api-lib-sbom.json"
"health-api-library/library/build/reports/gini-health-api-lib-sbom.json"
"bank-api-library/library/build/reports/gini-bank-api-lib-sbom.json"
"health-sdk/sdk/build/reports/gini-health-sdk-sbom.json"
"capture-sdk/sdk/build/reports/gini-capture-sdk-sbom.json"
"capture-sdk/default-network/build/reports/gini-capture-sdk-default-network-sbom.json"
"bank-sdk/sdk/build/reports/gini-bank-sdk-sbom.json"
)
echo "Submitting $sbom to GitHub Dependency Graph ${GITHUB_RUN_ID}"
manifests_json=""
for sbom in "${json_sboms[@]}"; do
sbom_name=$(basename "$sbom")
manifests_json+=$'
"'"$sbom_name"'": {
"name": "'"$sbom_name"'",
"file": {
"source_location": "'"$sbom"'"
}
},'
done
manifests_json="${manifests_json%?${manifests_json##*,}}"
payload=$(cat <<EOF
{
"version": 5,
"sha": "$sha",
"ref": "refs/heads/${GITHUB_REF#refs/heads/}",
"job": {
"correlator": "$correlatorName",
"id": "${GITHUB_RUN_ID}"
},
"detector": {
"name": "CycloneDX",
"version": "1.4",
"url": "https://cyclonedx.org"
},
"scanned": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
"manifests": {
$manifests_json
}
}
EOF
)
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/dependency-graph/snapshots \
-d "$payload"
# Step 3: Confirm Submission
- name: Confirm SBOM Submission
run: echo "SBOM submitted successfully"
58 changes: 58 additions & 0 deletions .github/workflows/gpc.publish.firebase.example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Publish GPC Example App QA Build to Firebase distribution

on:
workflow_dispatch:
jobs:
check:
uses: ./.github/workflows/bank-sdk.check.yml
secrets:
GINI_MOBILE_TEST_CLIENT_SECRET: ${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}
BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD: ${{ secrets.BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}

publish_to_firebase_distribution:
needs: check
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 ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.0'
bundler-cache: true

- name: build release example app for QA
run: >
./gradlew bank-sdk:example-app:assembleQaPaymentProvider3Release
-PclientId="gini-mobile-test"
-PclientSecret="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}"
-PreleaseKeystoreFile="screen_api_example.jks"
-PreleaseKeystorePassword='${{ secrets.BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}'
-PreleaseKeyAlias="screen_api_example"
-PreleaseKeyPassword='${{ secrets.BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}'
- name: Check file existence
uses: andstor/file-existence-action@v3
with:
files: "./bank-sdk/example-app/build/outputs/apk/qaPaymentProvider3/release/example-app-qa-paymentProvider3-release.apk"
fail: true

- name: Distribute GPC example apk to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{secrets.GINI_PAYMENT_PROVIDER_EXAMPLE_APP_FIREBASE_ID}}
serviceCredentialsFileContent: ${{ secrets.FIREBASE_CREDENTIAL_FILE_CONTENT }}
groups: testers
file: bank-sdk/example-app/build/outputs/apk/qaPaymentProvider3/release/example-app-qa-paymentProvider3-release.apk
releaseNotes: |
${{ format('{{ {0} {1} }}', github.ref, github.sha) }}
${{ github.event.head_commit.message }}
51 changes: 17 additions & 34 deletions .github/workflows/health-api-library.check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,14 @@ on:
required: true
workflow_dispatch:
inputs:
clientId:
description: 'Client ID'
healthApiEnvironment:
description: 'Health API Environment'
required: true
type: string
default: ''
clientSecret:
description: 'Client Secret'
required: true
type: string
default: ''
healthApiBaseUrl:
description: 'Health API Base URL'
required: true
type: string
default: ''
userCenterBaseUrl:
description: 'User Center Base URL'
required: true
type: string
default: ''
payApiBaseUrl:
description: 'Pay API Base URL'
required: true
type: string
default: ''

default: 'production'
type: choice
options:
- production
- staging

jobs:
test:
Expand Down Expand Up @@ -81,7 +63,7 @@ jobs:
#
# - name: archive unit test coverage report
# if: always()
# uses: actions/upload-artifact@v3
# uses: actions/upload-artifact@v4
# with:
# name: health-api-library-unit-test-coverage
# path: health-api-library/library/build/jacoco/jacocoHtml
Expand Down Expand Up @@ -128,9 +110,10 @@ jobs:
disable-animations: true
script: echo "Generated AVD snapshot for caching."

- name: run instrumented tests
- name: "run instrumented tests using Health API environment: ${{ inputs.healthApiEnvironment }}"
timeout-minutes: 20
uses: reactivecircus/android-emulator-runner@v2
if: ${{ inputs.healthApiEnvironment != 'staging' || matrix.api-level != 22 }}
with:
api-level: ${{ matrix.api-level }}
arch: x86_64
Expand All @@ -139,12 +122,12 @@ jobs:
disable-animations: true
script: >
adb uninstall net.gini.android.health.api.test ;
./gradlew health-api-library:library:connectedCheck
-PtestClientId="${{ inputs.clientId != '' && inputs.clientId || 'gini-mobile-test'}}"
-PtestClientSecret="${{ inputs.clientSecret != '' && inputs.clientSecret || secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}"
-PtestApiUri="${{ inputs.healthApiBaseUrl != '' && inputs.healthApiBaseUrl || 'https://health-api.gini.net' }}"
-PtestUserCenterUri="${{ inputs.userCenterBaseUrl != '' && inputs.userCenterBaseUrl || 'https://user.gini.net' }}"
-PtestBankApiUri="${{ inputs.payApiBaseUrl != '' && inputs.payApiBaseUrl || 'https://pay-api.gini.net' }}"
./gradlew -Pandroid.testInstrumentationRunnerArguments.apiEnv=${{ inputs.healthApiEnvironment }} health-api-library:library:connectedCheck
-PtestClientId='gini-mobile-test'
-PtestClientSecret='${{ inputs.healthApiEnvironment == 'staging' && secrets.STAGING_GINI_MOBILE_TEST_CLIENT_SECRET || secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}'
-PtestApiUri='${{ inputs.healthApiEnvironment == 'staging' && 'https://health-api.stage.gini.net' || 'https://health-api.gini.net' }}'
-PtestUserCenterUri='${{ inputs.healthApiEnvironment == 'staging' && 'https://user.stage.gini.net' || 'https://user.gini.net' }}'
-PtestBankApiUri='${{ inputs.healthApiEnvironment == 'staging' && 'https://pay-api.pia.stage.gini.net' || 'https://pay-api.gini.net' }}'
- name: archive instrumented test results
if: always()
Expand Down Expand Up @@ -211,7 +194,7 @@ jobs:
run: ./gradlew health-api-library:library:lint

- name: archive android lint report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: health-api-library-android-lint-report
path: health-api-library/library/build/reports/lint-results*.html
Expand Down
Loading

0 comments on commit 2c316d6

Please sign in to comment.