Skip to content

Merge pull request #228 from square/mansi/upgrade_ios_sdk_1.7.2 #341

Merge pull request #228 from square/mansi/upgrade_ios_sdk_1.7.2

Merge pull request #228 from square/mansi/upgrade_ios_sdk_1.7.2 #341

Workflow file for this run

name: react-native-square-reader-SDK
on: [push]
jobs:
install-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20.x
- run: |
yarn && yarn lint && yarn test &&
cd reader-sdk-react-native-quickstart && yarn
yarn lint && cd ..
build-android:
runs-on: ubuntu-latest
steps:
- name: Cache Gradle Wrapper
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 20.x
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Verify Java version
run: java -version
- name: Cache Gradle Dependencies
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Checkout the current repo
uses: actions/checkout@v3
- name: Install npm dependencies
working-directory: ./reader-sdk-react-native-quickstart
run: yarn
- name: Build
working-directory: ./reader-sdk-react-native-quickstart/android
env:
SQUARE_READER_SDK_APPLICATION_ID: ${{secrets.SQUARE_READER_SDK_APPLICATION_ID}}
SQUARE_READER_SDK_REPOSITORY_PASSWORD: ${{secrets.SQUARE_READER_SDK_REPOSITORY_PASSWORD}}
run: |
./gradlew clean build -PSQUARE_READER_SDK_APPLICATION_ID=$SQUARE_READER_SDK_APPLICATION_ID -PSQUARE_READER_SDK_REPOSITORY_PASSWORD=$SQUARE_READER_SDK_REPOSITORY_PASSWORD -x lint -x lintVitalRelease
build-ios:
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1.5.1
with:
xcode-version: latest-stable
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 20.x
- uses: actions/checkout@v3
- name: Install Dependencies
working-directory: ./reader-sdk-react-native-quickstart
run: yarn
- name: Install Pod Dependencies
working-directory: ./reader-sdk-react-native-quickstart/ios
run: pod install
- name: Install Reader SDK
working-directory: ./reader-sdk-react-native-quickstart/ios
run: ruby <(curl https://connect.squareup.com/readersdk-installer) install --app-id ${{secrets.SQUARE_READER_SDK_APPLICATION_ID}} --repo-password ${{secrets.SQUARE_READER_SDK_REPOSITORY_PASSWORD}} --version 1.6.1 > /dev/null
- name: Build iOS (debug)
working-directory: ./reader-sdk-react-native-quickstart/ios
run: xcodebuild -workspace RNReaderSDKSample.xcworkspace -configuration Debug -scheme RNReaderSDKSample -destination "platform=iOS Simulator,OS=16.2,name=iPhone 14"