Version Packages #541
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR | |
| on: pull_request | |
| permissions: | |
| contents: read | |
| env: | |
| VisualStudioVersion: '18.0' | |
| WindowsTargetPlatformVersion: '10.0.26100.0' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| js: | |
| name: JS PR | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up toolchain | |
| uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@1230975885a9e5d3a2ad58b1483f80b09cec04f2 # 5.2.3 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: yarn | |
| - name: Build CI | |
| run: yarn lage buildci | |
| android: | |
| name: Android PR | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| - name: Set up toolchain | |
| uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@1230975885a9e5d3a2ad58b1483f80b09cec04f2 # 5.2.3 | |
| with: | |
| platform: android | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: yarn | |
| - name: Build packages | |
| run: yarn build | |
| - name: Bundle Android | |
| run: yarn bundle:android | |
| working-directory: apps/fluent-tester | |
| # Android E2E tests are currently disabled | |
| # - name: Build Android APK | |
| # ... | |
| # - name: Run E2E Android tests | |
| # ... | |
| macos: | |
| name: macOS PR | |
| runs-on: macos-26 | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| - name: Set up toolchain | |
| uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@1230975885a9e5d3a2ad58b1483f80b09cec04f2 # 5.2.3 | |
| with: | |
| platform: macos | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: yarn | |
| - name: Build packages | |
| run: yarn build | |
| - name: Bundle macOS | |
| run: | | |
| set -eox pipefail | |
| yarn bundle:macos | |
| working-directory: apps/fluent-tester | |
| - name: Pod install | |
| run: | | |
| set -eox pipefail | |
| pod install --verbose | |
| working-directory: apps/fluent-tester/macos | |
| - name: Build macOS app | |
| run: ./.github/scripts/xcodebuild.mts apps/fluent-tester/macos/FluentTester.xcworkspace macosx ReactTestApp build | |
| env: | |
| CCACHE_DISABLE: 1 | |
| # Disable macOS E2E test to unblock 0.81 checkin | |
| - name: Prepare E2E macOS tests | |
| run: yarn e2eprep:macos | |
| working-directory: apps/E2E | |
| - name: Run E2E macOS tests | |
| run: yarn e2etest:macos | |
| working-directory: apps/E2E | |
| - name: Upload E2E macOS artifacts | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: E2E_macos_Dump | |
| path: | | |
| apps/E2E/reports | |
| apps/E2E/errorShots | |
| ios: | |
| name: iOS PR | |
| runs-on: macos-26 | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| - name: Set up toolchain | |
| uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@1230975885a9e5d3a2ad58b1483f80b09cec04f2 # 5.2.3 | |
| with: | |
| platform: ios | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: yarn | |
| - name: Build packages | |
| run: yarn build | |
| - name: Bundle iOS | |
| run: | | |
| set -eox pipefail | |
| yarn bundle:ios | |
| working-directory: apps/fluent-tester | |
| - name: Pod install | |
| run: | | |
| set -eox pipefail | |
| pod install --verbose | |
| working-directory: apps/fluent-tester/ios | |
| - name: Build iOS app | |
| run: ./.github/scripts/xcodebuild.mts apps/fluent-tester/ios/FluentTester.xcworkspace iphonesimulator ReactTestApp build | |
| env: | |
| CCACHE_DISABLE: 1 | |
| # iOS E2E tests are currently disabled | |
| # - name: Prepare E2E iOS tests | |
| # run: yarn e2eprep:ios | |
| # working-directory: apps/E2E | |
| # - name: Run E2E iOS tests | |
| # run: yarn e2etest:ios | |
| # working-directory: apps/E2E | |
| windows: | |
| name: Windows PR | |
| runs-on: windows-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| with: | |
| fetch-depth: 5 | |
| - name: Set up toolchain | |
| uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@1230975885a9e5d3a2ad58b1483f80b09cec04f2 # 5.2.3 | |
| with: | |
| platform: windows | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: yarn | |
| - name: Build packages | |
| run: yarn build | |
| - name: Bundle Windows | |
| run: yarn bundle:windows | |
| working-directory: apps/fluent-tester | |
| - name: Install WinAppDriver 1.1 | |
| run: | | |
| Invoke-WebRequest https://github.com/microsoft/WinAppDriver/releases/download/v1.1/WindowsApplicationDriver.msi -OutFile $env:RUNNER_TEMP\WinAppDriver.msi | |
| Start-Process msiexec -ArgumentList "/quiet","/x","{087BBF93-D9E3-4D27-BDBE-9C702E0066FC}" -Verb runAs -Wait | |
| Start-Process msiexec -ArgumentList "/quiet","/i","$env:RUNNER_TEMP\WinAppDriver.msi" -Verb runAs -Wait | |
| shell: powershell | |
| - name: Generate RNW app | |
| run: yarn install-windows-test-app --use-nuget | |
| working-directory: apps/fluent-tester | |
| - name: Prepare E2E Windows tests | |
| run: yarn e2eprep:windows | |
| working-directory: apps/E2E | |
| - name: Start packager | |
| run: cmd /c "start /B cmd /c yarn start ^> packager.log 2^>^&1" | |
| working-directory: apps/fluent-tester | |
| # First build of RNW may fail with Cannot open include file: 'CppWinRTIncludes.h' error | |
| # So we run the build command twice | |
| - name: Build RNW app | |
| run: yarn windows --arch x64 --logging --no-packager --no-launch --msbuildprops WindowsTargetPlatformVersion=10.0.26100.0; yarn windows --arch x64 --logging --no-packager --no-launch --msbuildprops WindowsTargetPlatformVersion=10.0.26100.0 || yarn windows --arch x64 --logging --no-packager --no-launch --singleproc --msbuildprops WindowsTargetPlatformVersion=10.0.26100.0 | |
| working-directory: apps/fluent-tester | |
| - name: Run E2E RNW tests | |
| shell: powershell | |
| run: | | |
| .\launchE2EWindows.ps1 -enableDumpFiles | |
| working-directory: apps/E2E | |
| - name: Upload E2E Windows artifacts | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: E2E_RNW_Dump | |
| path: | | |
| apps/E2E/reports | |
| apps/E2E/errorShots | |
| apps/fluent-tester/packager.log | |
| win32: | |
| name: Win32 PR | |
| runs-on: windows-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| - name: Set up toolchain | |
| uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@1230975885a9e5d3a2ad58b1483f80b09cec04f2 # 5.2.3 | |
| with: | |
| platform: windows | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: yarn | |
| - name: Build packages | |
| run: yarn build | |
| - name: Bundle Win32 | |
| run: yarn bundle | |
| working-directory: apps/win32 | |
| - name: Install WinAppDriver 1.1 | |
| run: | | |
| Invoke-WebRequest https://github.com/microsoft/WinAppDriver/releases/download/v1.1/WindowsApplicationDriver.msi -OutFile $env:RUNNER_TEMP\WinAppDriver.msi | |
| Start-Process msiexec -ArgumentList "/quiet","/x","{087BBF93-D9E3-4D27-BDBE-9C702E0066FC}" -Verb runAs -Wait | |
| Start-Process msiexec -ArgumentList "/quiet","/i","$env:RUNNER_TEMP\WinAppDriver.msi" -Verb runAs -Wait | |
| shell: powershell | |
| - name: Prepare E2E Win32 tests | |
| run: yarn e2eprep:win32 | |
| working-directory: apps/E2E | |
| - name: Run E2E Win32 tests | |
| run: yarn e2etest:win32 | |
| working-directory: apps/E2E | |
| - name: Upload E2E Win32 artifacts | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: E2E_win32_Dump | |
| path: | | |
| apps/E2E/reports | |
| apps/E2E/errorShots | |
| check-changesets: | |
| name: Check for Changesets | |
| runs-on: ubuntu-latest | |
| # Skip this check for the version bump PR created by changesets | |
| if: ${{ github.head_ref != 'changeset-release/main' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| with: | |
| filter: blob:none | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 | |
| with: | |
| node-version: '22' | |
| cache: 'yarn' | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Validate changesets | |
| run: yarn change:check | |
| publish-dry-run-pack: | |
| name: NPM Publish Dry Run — Pack | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| outputs: | |
| has-tarballs: ${{ steps.check.outputs.has-tarballs }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| - name: Set up toolchain | |
| uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@1230975885a9e5d3a2ad58b1483f80b09cec04f2 # 5.2.3 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: yarn | |
| - name: Build packages | |
| run: yarn build | |
| - name: Pack packages | |
| run: yarn lage pack --verbose --grouped | |
| - name: List packed tarballs | |
| id: check | |
| run: | | |
| ls -laR _packed/ | |
| if ls _packed/*/*.tgz > /dev/null 2>&1; then | |
| echo "has-tarballs=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "has-tarballs=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Upload packed tarballs | |
| if: steps.check.outputs.has-tarballs == 'true' | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: packed-tarballs-dry-run | |
| path: _packed/ | |
| test-links: | |
| name: Test repo links | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| - name: Set up toolchain | |
| uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@1230975885a9e5d3a2ad58b1483f80b09cec04f2 # 5.2.3 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: yarn | |
| - name: Test markdown links | |
| run: yarn lage test-links --verbose --grouped | |
| pr: | |
| name: PR | |
| if: always() | |
| runs-on: ubuntu-latest | |
| needs: | |
| - js | |
| - android | |
| - macos | |
| - ios | |
| - windows | |
| - win32 | |
| - check-changesets | |
| - publish-dry-run-pack | |
| - test-links | |
| steps: | |
| - name: Check for failures or cancellations | |
| if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} | |
| run: | | |
| echo "One or more required jobs failed or were cancelled." | |
| exit 1 | |
| - name: All required jobs passed | |
| run: echo "All required jobs completed successfully." |