Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update workflows to support building and uploading to Appetize #177

Merged
merged 122 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
474a075
Implement HUC
Oct 11, 2022
f0f8fb6
Bump example
Oct 11, 2022
d63b640
Renames
Oct 11, 2022
b76adc6
Bump Adyen test creds
Oct 11, 2022
b25bde4
Bump test creds
Oct 11, 2022
9a42566
Set delegate
Oct 25, 2022
c1c568a
Bump rebase
Oct 27, 2022
8c201c5
Refactor errors
Oct 31, 2022
8378c44
Filter out unsupported implementation
Oct 31, 2022
3f5150e
Bump
Oct 31, 2022
53ced6f
Bump example
Oct 11, 2022
38ff5b1
Renames
Oct 11, 2022
bf08fa0
Bump example app
Oct 25, 2022
f716925
Add screens
Oct 27, 2022
379aca3
Bump retailer screen
Oct 31, 2022
6370079
Bump id
Oct 31, 2022
00e984e
Refactor `configure` function
Oct 31, 2022
83b14a1
Expose card network icons to RN
Oct 31, 2022
e393dcc
Remove PrimerSDK button
Nov 1, 2022
015d31c
Change retail outlets screen
Nov 1, 2022
9438382
Android RN bridge (#131)
semirp Nov 2, 2022
1bf300c
Fixed Raw Data Manager init data mapping, removed unnecessary code
semirp Nov 2, 2022
32e9592
Allow line item editing
Nov 2, 2022
550366c
Added new contries and currencies
semirp Nov 3, 2022
75c6f6e
Fix logs
Nov 3, 2022
268dd52
Modify function
Nov 3, 2022
dda13d6
Change to Klarna vaulting
Nov 3, 2022
5064175
Add `PrimerKlarnaSDK` post install script
Nov 3, 2022
209893a
Bump
Nov 3, 2022
19e2cc3
Updated RN example app
Nov 3, 2022
5aa1d68
Updated Raw Manager function, added Klarna dependency
semirp Nov 3, 2022
6514b4f
Fixed events mapping
semirp Nov 3, 2022
63f4331
Update to React Native 0.70.4 and Xcode 14.1
Nov 4, 2022
27bb6d1
Bump
Nov 4, 2022
bc1d57b
Add new example app
Nov 4, 2022
97b25bd
Fix debug build
Nov 4, 2022
61e1d72
Move new example app
Nov 7, 2022
4ed83b5
Fix line items view
Nov 7, 2022
afe9458
Fixed Android app
semirp Nov 8, 2022
a7c600b
Revert axios version
semirp Nov 8, 2022
1a202f8
Enable debug logs
Nov 15, 2022
551e44d
Set manual dependency order
Nov 15, 2022
457248d
Fix post install script
Nov 15, 2022
0e24b13
Update iOS dependency
Nov 15, 2022
e01a6ee
Modify example app
Nov 16, 2022
a10fac2
Add test IDs
Nov 17, 2022
bfb4052
Bump
Dec 22, 2022
b994c9a
Update iOS dependency
Dec 22, 2022
55414e9
Add search paths. Fix code signing of resource bundles.
Dec 22, 2022
c98e378
Integrated SDK with the new example app (#142)
semirp Jan 3, 2023
ae2000b
Updated version
semirp Jan 3, 2023
2fbca82
Add entitlements
Dec 22, 2022
880f657
Updated applicationId
semirp Jan 3, 2023
629e0d0
Pass data on callback
Jan 4, 2023
93ec5d1
Add `removeListeners`
Jan 4, 2023
cb77003
Fixed callback event names for Drop-In
semirp Jan 4, 2023
2796003
Added native emitter methods
semirp Jan 4, 2023
06d9b24
Bump
Jan 4, 2023
60ec534
Add `cleanUp` function
Jan 4, 2023
60b9afc
Rename RN dispose to cleanUp
Jan 4, 2023
7c25145
Rename `dispose()` to `cleanUp()`
Jan 4, 2023
8723d3f
Bump
Jan 4, 2023
1b9a7a8
Renamed dispose to cleanUp
semirp Jan 4, 2023
a72ce3d
Expose key of validation error
Jan 5, 2023
1a33ab0
Rename
Jan 5, 2023
036d7fc
Pass `checkoutData` on error
Jan 5, 2023
c74d5de
Show `checkoutData` on error on HUC
Jan 5, 2023
e90ca23
Changed validation error field
semirp Jan 5, 2023
8733622
Pass `errorId`
Jan 10, 2023
ae93d4e
Map `diagnosticsId`
Jan 10, 2023
7566cb8
Mapped diagnosticsId to errors
semirp Jan 10, 2023
8c139cf
Updated model names, updated card data
semirp Jan 12, 2023
3174545
Rename exposed interfaces
Jan 12, 2023
71a32c2
Rename
Jan 12, 2023
a764ea5
Refactor `expiryDate`
Jan 12, 2023
6b64abe
Bump
Jan 12, 2023
292dcb5
Bump
Jan 12, 2023
fe43f03
Update iOS dependency
Jan 13, 2023
440c247
Bumped Android version
semirp Jan 13, 2023
735d445
👊 v.2.20.0-RC.1
semirp Jan 13, 2023
aea04f8
Remove unimplemented card components manager
Jan 13, 2023
6440dde
Revert "👊 v.2.20.0-RC.1"
Jan 13, 2023
cdfb7b6
👊 v.2.20.0-RC.1
Jan 13, 2023
3f29095
Updated naming of managers
semirp Jan 16, 2023
d3963ee
Updated errors
semirp Jan 16, 2023
0755850
Updated Android SDK API
semirp Jan 17, 2023
acbb729
Update iOS dependency
Jan 23, 2023
526de0b
Bump
EvansPie Jan 23, 2023
733005e
Bump
EvansPie Jan 23, 2023
fda18eb
Updated Android SDK version
semirp Jan 23, 2023
359582a
👊 v.2.17.0-rc.1
EvansPie Jan 23, 2023
309a369
[CHKT-986] Added GH actions
semirp Feb 8, 2023
9f55078
[CHKT-986] Added GH actions
semirp Feb 9, 2023
c4056e4
[CHKT-986] Added GH actions
semirp Feb 9, 2023
a90dff2
Changed fastfile
semirp Feb 9, 2023
432831d
Fixed Appetize link generator
semirp Feb 13, 2023
1aa7d67
Fixed scripts
semirp Feb 13, 2023
7789ca9
Merge remote-tracking branch 'origin/master' into feature/CHKT-986_en…
jnewc Sep 12, 2023
bdf44bd
Post-merge fixes
jnewc Sep 12, 2023
e2a38ff
Update iOS project environment
jnewc Sep 12, 2023
93f64c4
Add iOS appetize lane to fastlane
jnewc Sep 12, 2023
312c82d
Update ios workflow
jnewc Sep 12, 2023
5743e2a
Update workflows with correct ruby + node versions + fixes
jnewc Sep 12, 2023
e816741
Correct npm config setting in workflows
jnewc Sep 12, 2023
5472f9c
resolve conflicting lane names
jnewc Sep 12, 2023
845cc19
Fix package.json build scripts to target correct dir for building fro…
jnewc Sep 12, 2023
241a2d0
Fix gradle path in fastfile
jnewc Sep 12, 2023
c12268c
Align workflow names for platforms
jnewc Sep 12, 2023
2a34a36
Add destination to build for browserstack
jnewc Sep 12, 2023
28d624b
Cleanup example name change from master
jnewc Sep 12, 2023
0e2b272
Update livedemostore urls for build upload
jnewc Sep 12, 2023
c86658c
Correct archive app path
jnewc Sep 13, 2023
fcdd447
Update report scripts location for iOS appetize build
jnewc Sep 13, 2023
8510d63
Use fallback URL provider when debugging (supports appetize/browserst…
jnewc Sep 13, 2023
d39c4ae
Workaround issue with cache action in github workflow ('**/...' -> '*…
jnewc Sep 13, 2023
7eebdb2
Ensure main.jsbundle is included in build bundle
jnewc Sep 13, 2023
573b038
Remove arm64 when building for browserstack to prevent IPay88 build e…
jnewc Sep 13, 2023
fb0de4d
Update bot token env var name
jnewc Sep 13, 2023
c19c63d
Remove browserstack slack messaging using non-existent script
jnewc Sep 13, 2023
06ae7e4
Update browserstack workflows
jnewc Sep 13, 2023
315fa08
Correct iOS workflow name to better label status checks
jnewc Sep 14, 2023
7f6e511
Disable browserstack test workflows until RN test specs are available
jnewc Sep 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 163 additions & 0 deletions .github/workflows/android-build-and-distribute.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
name: Android

on: pull_request

jobs:
android-distribute-to-appetize:
runs-on: ubuntu-latest
name: "Build and upload app to Appetize 🚀"
steps:

- name: Cancel previous jobs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v3

- uses: ruby/setup-ruby@v1
with:
ruby-version: "2.6"
bundler-cache: true

- uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'

- uses: actions/setup-node@v3
with:
node-version: 18

- name: Set legacy-peer-deps for npm config
run: |
npm config set legacy-peer-deps true

- name: Add slack message builder
run: |
yarn add slack-message-builder

- name: Install packages
run: |
yarn

- name: Distribute the React Native Android app on Appetize and upload to BrowserStack 🚀
run: bundle exec fastlane android appetize_build_and_upload
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
SOURCE_BRANCH: ${{ github.head_ref }}
APPETIZE_API_TOKEN: ${{ secrets.APPETIZE_API_TOKEN }}
BROWSERSTACK_USERNAME: ${{secrets.BROWSERSTACK_USERNAME}}
BROWSERSTACK_ACCESS_KEY: ${{secrets.BROWSERSTACK_ACCESS_KEY}}

- name: Save Browserstack ID
uses: actions/upload-artifact@v3
id: save_browserstack_id_step
with:
name: browserstack_id
path: /var/tmp/browserstack_id.txt
if-no-files-found: error

- uses: peter-evans/find-comment@v2
if: ${{ success() }}
id: find_comment
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: Appetize Android link

- uses: peter-evans/create-or-update-comment@v2
if: ${{ success() }}
with:
body: |
Appetize Android 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 }}

- name: Create Slack Success Summary Report
if: ${{ success() && github.event.pull_request.base.ref == 'master' }}
run: |
node report-scripts/appetize-success-report-script.js createAppetizeSummaryReport ${{ github.head_ref || github.ref_name }} 'RN Android'
- name: Slack Success Notification
if: ${{ success() && github.event.pull_request.base.ref == 'master' }}
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_MOBILE_SDK_CHANNEL }}
payload-file-path: '/var/tmp/appetize-success-link-summary.json'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

- name: Create Slack Failure Summary Report
if: ${{ failure() && github.event.pull_request.base.ref == 'master' }}
run: |
node report-scripts/appetize-failure-report-script.js createAppetizeSummaryReport ${{ github.head_ref || github.ref_name }} 'RN Android'
- name: Slack Notification
if: ${{ failure() && github.event.pull_request.base.ref == 'master' }}
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_MOBILE_SDK_CHANNEL }}
payload-file-path: '/var/tmp/appetize-failure-link-summary.json'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

android-test-via-browserstack:
if: false # Re-enable when we have tests set up
runs-on: ubuntu-latest
name: "Test on BrowserStack"
needs: android-distribute-to-appetize
steps:
- name: Clone and launch Browserstack tests via Appium 🧪
run: |
git clone -b develop https://project_41483872_bot:[email protected]/primer-io/dx/mobile-appium-tests.git .
env:
GITLAB_TEMP_PATH: ${{ secrets.GITLAB_APPIUM_PULL_KEY }}

- name: Retrieve Browserstack ID
uses: actions/download-artifact@v3
with:
name: browserstack_id
path: /var/tmp

- uses: actions/setup-node@v3
with:
node-version: 18

- name: Add slack message builder
run: |
yarn add slack-message-builder

- name: Install packages
run: |
npm install

- name: Run Appium Test
env:
BROWSERSTACK_USERNAME: ${{secrets.BROWSERSTACK_USERNAME}}
BROWSERSTACK_ACCESS_KEY: ${{secrets.BROWSERSTACK_ACCESS_KEY}}
run: |
export BROWSERSTACK_APP_ID=$(cat /var/tmp/browserstack_id.txt)
npx wdio config/wdio.rn.android.bs.conf.js

- name: Create Slack Failed Summary Report
if: ${{ failure() && github.event.pull_request.base.ref == 'master' }}
run: |
node report-scripts/slack-failed-report-script.js createSlackFailedSummaryReport ${{ steps.slack.outputs.thread_ts }}
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}

- name: Post detailed summary to Slack channel thread
if: ${{ failure() && github.event.pull_request.base.ref == 'master' }}
id: slack_thread
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_MOBILE_SDK_CHANNEL }}
payload-file-path: '/var/tmp/slack_failed_summary.json'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

- name: Create and post Github summary
if: ${{ success() || failure() }}
run: |
node report-scripts/github-tests-summary-script.js createGithubSummaryReport

30 changes: 0 additions & 30 deletions .github/workflows/android-preview.yml

This file was deleted.

Loading