name: CI on: [push, pull_request] jobs: js-tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Use Node.js 12.x uses: actions/setup-node@v1 with: node-version: 12.x - name: Install yarn run: npm install -g yarn - name: Get yarn cache id: yarn-cache run: echo "::set-output name=dir::$(yarn cache dir)" - uses: actions/cache@v1 with: path: ${{ steps.yarn-cache.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: Install dependencies run: yarn install - name: Run tests run: yarn test android-build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Use Node.js 12.x uses: actions/setup-node@v1 with: node-version: 12.x - name: Install yarn run: npm install -g yarn - name: Get yarn cache id: yarn-cache run: echo "::set-output name=dir::$(yarn cache dir)" - uses: actions/cache@v1 with: path: ${{ steps.yarn-cache.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: Install dependencies run: yarn install - name: Build android example app run: cd example/android && ./gradlew assembleDebug ios-build: runs-on: macOS-latest steps: - uses: actions/checkout@v1 - name: Use Node.js 12.x uses: actions/setup-node@v1 with: node-version: 12.x - uses: actions/setup-ruby@v1 with: ruby-version: '2.x' - name: Install cocoapods run: gem install cocoapods - name: Install yarn run: npm install -g yarn - name: Get yarn cache id: yarn-cache run: echo "::set-output name=dir::$(yarn cache dir)" - uses: actions/cache@v1 with: path: ${{ steps.yarn-cache.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: Install dependencies run: yarn install - name: Install pods run: cd example/ios && pod install - name: Build ios example app run: cd example/ios && xcodebuild -scheme SafeAreaViewExample -workspace SafeAreaViewExample.xcworkspace ONLY_ACTIVE_ARCH=NO -sdk iphonesimulator -configuration Debug