diff --git a/.github/workflows/android-build-test.yml b/.github/workflows/android-build-test.yml index e0032d605d..5c463562e9 100644 --- a/.github/workflows/android-build-test.yml +++ b/.github/workflows/android-build-test.yml @@ -1,10 +1,21 @@ -name: Test android build +name: Test Android build on: pull_request: - branches: [master] + branches: + - master + paths: + - 'android/**' + push: + branches: + - master jobs: build: runs-on: ubuntu-latest + env: + WORKING_DIRECTORY: TestsExample + concurrency: + group: android-${{ github.ref }} + cancel-in-progress: true steps: - name: checkout uses: actions/checkout@v2 @@ -14,8 +25,8 @@ jobs: node-version: 14 cache: 'yarn' - name: Install node dependencies - working-directory: TestsExample + working-directory: ${{ env.WORKING_DIRECTORY }} run: yarn - name: Build app - working-directory: TestsExample/android + working-directory: ${{ env.WORKING_DIRECTORY }}/android run: ./gradlew assembleDebug --console=plain diff --git a/.github/workflows/ios-build-test.yml b/.github/workflows/ios-build-test.yml index 1451182cbd..ca4349c363 100644 --- a/.github/workflows/ios-build-test.yml +++ b/.github/workflows/ios-build-test.yml @@ -1,10 +1,21 @@ name: Test iOS build on: pull_request: - branches: [master] + branches: + - master + paths: + - 'ios/**' + push: + branches: + - master jobs: build: runs-on: macos-latest + env: + WORKING_DIRECTORY: TestsExample + concurrency: + group: ios-${{ github.ref }} + cancel-in-progress: true steps: - name: checkout uses: actions/checkout@v2 @@ -15,11 +26,11 @@ jobs: cache: 'yarn' cache-dependency-path: 'TestsExample/yarn.lock' - name: Install node dependencies - working-directory: TestsExample + working-directory: ${{ env.WORKING_DIRECTORY }} run: yarn - name: Install pods - working-directory: TestsExample/ios + working-directory: ${{ env.WORKING_DIRECTORY }}/ios run: pod install - name: Build app - working-directory: TestsExample - run: xcodebuild -workspace ios/TestsExample.xcworkspace -destination 'platform=iOS Simulator,name=iPhone 8' -scheme TestsExample -parallelizeTargets -configuration Debug -derivedDataPath ios/build -UseModernBuildSystem=YES -quiet | xcpretty + working-directory: ${{ env.WORKING_DIRECTORY }} + run: yarn ios diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 56156260f6..0b502e2fb1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,4 @@ name: Lint - on: push: branches: @@ -7,15 +6,22 @@ on: pull_request: branches: - master - jobs: install-and-lint: runs-on: ubuntu-latest + concurrency: + group: install-and-lint-${{ github.ref }} + cancel-in-progress: true steps: - - uses: actions/checkout@v2 - - name: Install dependencies - run: | - yarn + - name: checkout + uses: actions/checkout@v2 + - name: Use Node.js 14 + uses: actions/setup-node@v2 + with: + node-version: 14 + cache: 'yarn' + - name: Install node dependencies + run: yarn - name: Format code run: | yarn format diff --git a/.github/workflows/tv-os-build-test.yml b/.github/workflows/tv-os-build-test.yml index d72f5f78ee..121c71c885 100644 --- a/.github/workflows/tv-os-build-test.yml +++ b/.github/workflows/tv-os-build-test.yml @@ -1,10 +1,21 @@ name: Test tvOS build on: pull_request: - branches: [master] + branches: + - master + paths: + - 'ios/**' + push: + branches: + - master jobs: build: runs-on: macos-latest + env: + WORKING_DIRECTORY: TVOSExample + concurrency: + group: ios-${{ github.ref }} + cancel-in-progress: true steps: - name: checkout uses: actions/checkout@v2 @@ -15,11 +26,11 @@ jobs: cache: 'yarn' cache-dependency-path: 'TVOSExample/yarn.lock' - name: Install node dependencies - working-directory: TVOSExample + working-directory: ${{ env.WORKING_DIRECTORY }} run: yarn - name: Install pods - working-directory: TVOSExample/ios + working-directory: ${{ env.WORKING_DIRECTORY }}/ios run: pod install - name: Build app - working-directory: TVOSExample - run: xcodebuild -workspace ios/TVOSExample.xcworkspace -destination 'platform=tvOS Simulator,name=Apple TV' -scheme TVOSExample-tvOS -parallelizeTargets -configuration Release -derivedDataPath ios/build -UseModernBuildSystem=YES -quiet | xcpretty + working-directory: ${{ env.WORKING_DIRECTORY }} + run: yarn tv-os