Quick fix to hide NOL pay from Drop-In #243
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: Build app | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
concurrency: | |
group: ${{ github.ref }}-tests | |
cancel-in-progress: true | |
jobs: | |
unit-tests-sdk: | |
runs-on: macos-13-large | |
timeout-minutes: 20 | |
name: "Unit Tests - SDK" | |
steps: | |
- name: Cancel previous jobs | |
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: Git - Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
ref: ${{ github.ref }} | |
- name: Run SDK tests | |
uses: ./.github/actions/sdk-tests | |
with: | |
ssh-private-key: ${{ secrets.SSH_KEY }} | |
known-hosts: ${{ secrets.KNOWN_HOSTS }} | |
match-password: ${{ secrets.MATCH_PASSWORD }} | |
match-git-private-key: ${{ secrets.FASTLANE_PASSWORD }} | |
fastlane-session: ${{ secrets.FASTLANE_SESSION }} | |
fastlane-password: ${{ secrets.FASTLANE_PASSWORD }} | |
match-keychain-name: ${{ secrets.MATCH_KEYCHAIN_NAME }} | |
match-keychain-password: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} | |
sdk-name: sdk | |
optional-sdk-tests: | |
name: Optional SDK Tests | |
runs-on: macos-13-large | |
strategy: | |
max-parallel: 3 | |
matrix: | |
package-swift: | |
- { name: 'nol-pay', file: 'Package.NolPay.swift' } | |
- { name: 'klarna', file: Package.Klarna.swift } | |
- { name: '3DS', file: Package.3DS.swift } | |
steps: | |
- name: Cancel previous jobs | |
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: Git - Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
ref: ${{ github.ref }} | |
- name: Run SDK tests | |
uses: ./.github/actions/sdk-tests | |
with: | |
ssh-private-key: ${{ secrets.SSH_KEY }} | |
known-hosts: ${{ secrets.KNOWN_HOSTS }} | |
match-password: ${{ secrets.MATCH_PASSWORD }} | |
match-git-private-key: ${{ secrets.FASTLANE_PASSWORD }} | |
fastlane-session: ${{ secrets.FASTLANE_SESSION }} | |
fastlane-password: ${{ secrets.FASTLANE_PASSWORD }} | |
match-keychain-name: ${{ secrets.MATCH_KEYCHAIN_NAME }} | |
match-keychain-password: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} | |
sdk-name: ${{ matrix.package-swift.name }} | |
package-swift: ${{ matrix.package-swift.file }} | |
unit-tests-debug-app: | |
runs-on: macos-13-large | |
timeout-minutes: 20 | |
name: "Unit Tests - Debug App" | |
steps: | |
- name: Cancel previous jobs | |
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: Git - Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
ref: ${{ github.ref }} | |
- name: Run debug app tests | |
uses: ./.github/actions/sdk-tests | |
with: | |
ssh-private-key: ${{ secrets.SSH_KEY }} | |
known-hosts: ${{ secrets.KNOWN_HOSTS }} | |
match-password: ${{ secrets.MATCH_PASSWORD }} | |
match-git-private-key: ${{ secrets.FASTLANE_PASSWORD }} | |
fastlane-session: ${{ secrets.FASTLANE_SESSION }} | |
fastlane-password: ${{ secrets.FASTLANE_PASSWORD }} | |
match-keychain-name: ${{ secrets.MATCH_KEYCHAIN_NAME }} | |
match-keychain-password: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} | |
fastlane-test-lane: test_debug_app | |
sonarcloud: | |
needs: | |
- unit-tests-sdk | |
- optional-sdk-tests | |
name: SonarCloud | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: SonarCloud Scan | |
uses: ./.github/actions/sonar | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
sonar-token: ${{ secrets.SONAR_TOKEN }} | |
sonar-host: https://sonarcloud.io. | |
pull-request-number: ${{ github.event.pull_request.number }} | |
branch: ${{ github.head_ref }} | |
base-branch: ${{ github.base_ref }} | |
pull-request-sha: ${{ github.event.pull_request.head.sha }} | |
coverage-file-names: sonar-coverage-sdk.xml,sonar-coverage-3DS.xml,sonar-coverage-nol-pay.xml,sonar-coverage-klarna.xml | |
build-and-upload-to-appetize: | |
needs: | |
- unit-tests-sdk | |
- unit-tests-debug-app | |
runs-on: macos-13-large | |
timeout-minutes: 45 | |
name: "Build and upload app to Appetize" | |
steps: | |
- name: Cancel previous jobs | |
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # v0.12.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: Git - Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
ref: ${{ github.ref }} | |
- name: Upload preview to Appetize | |
id: appetize-upload | |
uses: ./.github/actions/appetize-build | |
with: | |
build_type: 'preview' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
ssh-private-key: ${{ secrets.SSH_KEY }} | |
known-hosts: ${{ secrets.KNOWN_HOSTS }} | |
match-password: ${{ secrets.MATCH_PASSWORD }} | |
match-git-private-key: ${{ secrets.FASTLANE_PASSWORD }} | |
fastlane-session: ${{ secrets.FASTLANE_SESSION }} | |
fastlane-password: ${{ secrets.FASTLANE_PASSWORD }} | |
match-keychain-name: ${{ secrets.MATCH_KEYCHAIN_NAME }} | |
match-keychain-password: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} | |
appetize-api-token: ${{ secrets.APPETIZE_API_TOKEN }} | |
source-branch: ${{ github.head_ref || github.ref_name }} | |
pr-number: ${{ github.event.pull_request.number }} | |
slack-channel: ${{ secrets.SLACK_MOBILE_SDK_CHANNEL }} | |
slack-reporter-token: ${{ secrets.SLACK_REPORTER_BOT_TOKEN }} | |
github-run-id: ${{ github.run_id }} | |
- uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e #v3.1.0 | |
if: ${{ success() }} | |
id: find_comment | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body-includes: Appetize link | |
- uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 #v4.0.0 | |
if: ${{ success() }} | |
with: | |
body: | | |
Appetize link: ${{ env.APPETIZE_APP_URL }} | |
edit-mode: replace | |
comment-id: ${{ steps.find_comment.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
token: ${{ secrets.GITHUB_TOKEN }} |