Skip to content

Merge pull request #225 from square/tbader/update-docs #304

Merge pull request #225 from square/tbader/update-docs

Merge pull request #225 from square/tbader/update-docs #304

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: 16.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: 16.x
- 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: 16.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"