name: Test Suite on: workflow_dispatch: {} push: branches: [master, 'sdk-*'] paths: - .github/workflows/test-suite.yml - apps/bare-expo/** - apps/test-suite/** - packages/** - yarn.lock pull_request: branches: [master] paths: - .github/workflows/test-suite.yml - apps/bare-expo/** - apps/test-suite/** - packages/** - yarn.lock jobs: web: runs-on: ubuntu-18.04 steps: - name: โฌข Setup Node uses: actions/setup-node@v2 with: node-version: '14.4.0' - name: ๐Ÿ‘€ Checkout uses: actions/checkout@v2 with: submodules: true - name: โ™ป๏ธ Restore workspace node modules uses: actions/cache@v2 id: node-modules-cache with: path: | # See "workspaces" โ†’ "packages" in the root package.json for the source of truth of # which node_modules are affected by the root yarn.lock node_modules apps/*/node_modules home/node_modules packages/*/node_modules packages/@unimodules/*/node_modules react-native-lab/react-native/node_modules key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} - name: ๐Ÿงถ Install node modules in root dir if: steps.node-modules-cache.outputs.cache-hit != 'true' run: yarn install --frozen-lockfile - run: yarn global add expo-cli - run: yarn test:web working-directory: apps/bare-expo - name: ๐Ÿ”” Notify on Slack uses: 8398a7/action-slack@v3 if: failure() && (github.event.ref == 'refs/heads/master' || startsWith(github.event.ref, 'refs/heads/sdk-')) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_web }} with: channel: '#platform-web' status: ${{ job.status }} fields: job,commit,ref,eventName,author,took author_name: Test Suite (Web) ios: runs-on: macos-10.15 steps: - name: ๐Ÿ‘€ Checkout uses: actions/checkout@v2 with: submodules: true - name: ๐Ÿบ Install required tools run: | brew tap wix/brew brew install applesimutils brew install watchman echo "$(pwd)/bin" >> $GITHUB_PATH - name: ๐Ÿ’Ž Setup Ruby and install gems uses: ruby/setup-ruby@v1 with: bundler-cache: true - name: โ™ป๏ธ Restore workspace node modules uses: actions/cache@v2 id: node-modules-cache with: path: | # See "workspaces" โ†’ "packages" in the root package.json for the source of truth of # which node_modules are affected by the root yarn.lock node_modules apps/*/node_modules home/node_modules packages/*/node_modules packages/@unimodules/*/node_modules react-native-lab/react-native/node_modules key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} - name: ๐Ÿงถ Install node modules in root dir if: steps.node-modules-cache.outputs.cache-hit != 'true' run: yarn install --frozen-lockfile - name: โ™ป๏ธ Restore apps/bare-expo/ios/Pods from cache uses: actions/cache@v2 id: pods-cache with: path: 'apps/bare-expo/ios/Pods' key: ${{ runner.os }}-bare-expo-pods-${{ hashFiles('apps/bare-expo/ios/Podfile.lock') }} restore-keys: | ${{ runner.os }}-bare-expo-pods- - name: ๐Ÿ•ต๏ธ Debug CocoaPods lockfiles run: git diff Podfile.lock Pods/Manifest.lock working-directory: apps/bare-expo/ios continue-on-error: true - name: ๐Ÿฅฅ Install pods in apps/bare-expo/ios run: pod install if: steps.pods-cache.outputs.cache-hit != 'true' || hashFiles('apps/bare-expo/ios/Podfile.lock') != hashFiles('apps/bare-expo/ios/Pods/Manifest.lock') working-directory: apps/bare-expo/ios - name: Clean Detox run: yarn detox:clean working-directory: apps/bare-expo - name: Build iOS project for Detox run: yarn ios:detox:build:release working-directory: apps/bare-expo timeout-minutes: 30 - name: Run tests run: yarn ios:detox:test:release working-directory: apps/bare-expo - name: Store images of build failures if: always() uses: actions/upload-artifact@v2 with: name: bare-expo-artifacts path: apps/bare-expo/artifacts - name: ๐Ÿ”” Notify on Slack uses: 8398a7/action-slack@v3 if: failure() && (github.event.ref == 'refs/heads/master' || startsWith(github.event.ref, 'refs/heads/sdk-')) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_ios }} with: channel: '#platform-ios' status: ${{ job.status }} fields: job,commit,ref,eventName,author,took author_name: Test Suite (iOS)