chore: update CI dependencies in .github/workflows/create-release.yaml #346
Workflow file for this run
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: Tests | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| jobs: | |
| lint: | |
| name: swiftlint | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Install SwiftLint | |
| run: brew list swiftlint >/dev/null 2>&1 || brew install swiftlint | |
| - name: Run SwiftLint | |
| run: make lint-ci | |
| test-packages: | |
| name: swift test (Packages) | |
| runs-on: [self-hosted, regular] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Swift version | |
| run: swift --version | |
| - name: Run package tests | |
| working-directory: Packages | |
| # No xcpretty: it doesn't understand swift-testing's output and | |
| # the non-ASCII record marker () crashes xcpretty 0.4.1 on Ruby 4 | |
| # with "invalid byte sequence in US-ASCII", which pipefail turns | |
| # into an exit-1 even when every test passed. | |
| run: swift test | |
| test-xcode: | |
| name: xcodebuild test (RxCode) | |
| runs-on: [self-hosted, regular] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Install xcpretty | |
| run: gem install xcpretty | |
| - name: Write Firebase config | |
| env: | |
| FIREBASE_MACOS_B64: ${{ secrets.FIREBASE_MACOS_B64 }} | |
| run: ./scripts/ci/write-firebase-config.sh | |
| - name: Run Xcode tests | |
| run: | | |
| set -o pipefail && xcodebuild \ | |
| -project RxCode.xcodeproj \ | |
| -scheme RxCode \ | |
| -configuration Debug \ | |
| -destination platform=macOS \ | |
| -testPlan UnitTestPlan \ | |
| -enableCodeCoverage NO \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| test | xcpretty | |
| build-smoke: | |
| name: xcodebuild build (Release) | |
| runs-on: self-hosted | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Install xcpretty | |
| run: gem install xcpretty | |
| - name: Write Firebase config | |
| env: | |
| FIREBASE_MACOS_B64: ${{ secrets.FIREBASE_MACOS_B64 }} | |
| run: ./scripts/ci/write-firebase-config.sh | |
| - name: Build (no signing) | |
| run: | | |
| set -o pipefail && xcodebuild \ | |
| -project RxCode.xcodeproj \ | |
| -scheme RxCode \ | |
| -configuration Release \ | |
| -destination platform=macOS \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| build | xcpretty | |
| build-mobile: | |
| name: xcodebuild build (RxCodeMobile) | |
| runs-on: self-hosted | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Install xcpretty | |
| run: gem install xcpretty | |
| - name: Write Firebase config | |
| env: | |
| FIREBASE_IOS_B64: ${{ secrets.FIREBASE_IOS_B64 }} | |
| run: ./scripts/ci/write-firebase-config.sh | |
| - name: Build mobile app (ad-hoc signing) | |
| run: | | |
| # The iOS app embeds extensions (notification service, widget), so | |
| # CODE_SIGNING_ALLOWED=NO won't link a valid .app. Ad-hoc sign the | |
| # device build instead — no certificate or provisioning profile | |
| # required, just enough to produce a verifiable bundle. | |
| # Release configuration: DEBUG is undefined here, so this also | |
| # catches code wrongly placed outside an `#if DEBUG` guard. | |
| set -o pipefail && xcodebuild \ | |
| -project RxCode.xcodeproj \ | |
| -scheme RxCodeMobile \ | |
| -configuration Release \ | |
| -destination 'generic/platform=iOS' \ | |
| CODE_SIGN_IDENTITY="-" \ | |
| CODE_SIGN_STYLE=Manual \ | |
| CODE_SIGNING_REQUIRED=NO \ | |
| CODE_SIGNING_ALLOWED=YES \ | |
| AD_HOC_CODE_SIGNING_ALLOWED=YES \ | |
| build | xcpretty | |
| test-mobile: | |
| name: xcodebuild test (RxCodeMobile UI - ${{ matrix.label }}) | |
| runs-on: [self-hosted, ui-tests] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - label: iPhone | |
| device-prefix: iPhone | |
| test-plan: MobileUITestPlan-iPhone | |
| - label: iPad | |
| device-prefix: iPad | |
| test-plan: MobileUITestPlan-iPad | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Install xcpretty | |
| run: gem install xcpretty | |
| - name: Write Firebase config | |
| env: | |
| FIREBASE_IOS_B64: ${{ secrets.FIREBASE_IOS_B64 }} | |
| run: ./scripts/ci/write-firebase-config.sh | |
| - name: Resolve simulator | |
| id: sim | |
| run: | | |
| # Pick the first available simulator matching the device family, so | |
| # the job survives Xcode bumping its bundled simulator models. | |
| UDID=$(xcrun simctl list devices available --json | python3 -c " | |
| import json, sys | |
| devices = json.load(sys.stdin)['devices'] | |
| prefix = '${{ matrix.device-prefix }}' | |
| for runtime in devices: | |
| for d in devices[runtime]: | |
| if d['name'].startswith(prefix): | |
| print(d['udid']); sys.exit(0) | |
| ") | |
| if [ -z "$UDID" ]; then | |
| echo "No '${{ matrix.device-prefix }}' simulator found. Available devices:" | |
| xcrun simctl list devices available | |
| exit 1 | |
| fi | |
| echo "Using ${{ matrix.device-prefix }} simulator $UDID" | |
| echo "udid=$UDID" >> "$GITHUB_OUTPUT" | |
| - name: Prepare simulator | |
| run: | | |
| # Erase first: the app persists pairing in UserDefaults/Keychain, and | |
| # a clean device guarantees the UI-test mock pairing path is taken. | |
| xcrun simctl shutdown "${{ steps.sim.outputs.udid }}" || true | |
| xcrun simctl erase "${{ steps.sim.outputs.udid }}" | |
| xcrun simctl boot "${{ steps.sim.outputs.udid }}" | |
| xcrun simctl bootstatus "${{ steps.sim.outputs.udid }}" | |
| - name: Run UI tests | |
| run: | | |
| set -o pipefail && xcodebuild \ | |
| -project RxCode.xcodeproj \ | |
| -scheme RxCodeMobile \ | |
| -configuration Debug \ | |
| -testPlan ${{ matrix.test-plan }} \ | |
| -destination "platform=iOS Simulator,id=${{ steps.sim.outputs.udid }}" \ | |
| -resultBundlePath "TestResults-${{ matrix.label }}.xcresult" \ | |
| -enableCodeCoverage NO \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| CODE_SIGNING_REQUIRED=NO \ | |
| test | xcpretty | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: mobile-ui-test-results-${{ matrix.label }} | |
| path: TestResults-${{ matrix.label }}.xcresult | |
| retention-days: 14 | |
| build-android: | |
| name: gradle build (RxCodeAndroid) | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Write Firebase config | |
| env: | |
| FIREBASE_ANDROID_B64: ${{ secrets.FIREBASE_ANDROID_B64 }} | |
| run: ./scripts/ci/write-firebase-config.sh | |
| - name: Assemble debug APK | |
| working-directory: RxCodeAndroid | |
| run: ./gradlew assembleDebug --stacktrace |