Repository navigation
Verify native installer candidates before draft release attachment #851
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| ios: | |
| name: iPhone companion | |
| runs-on: macos-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Install build tools | |
| run: | | |
| brew install xcodegen | |
| npm ci | |
| npm run build | |
| - name: Select an available iPhone simulator | |
| run: | | |
| xcrun simctl list devices available --json > "$RUNNER_TEMP/simulators.json" | |
| node --input-type=module <<'JS' >> "$GITHUB_ENV" | |
| import fs from "node:fs"; | |
| const { devices } = JSON.parse(fs.readFileSync(`${process.env.RUNNER_TEMP}/simulators.json`, "utf8")); | |
| const phone = Object.values(devices).flat().find(device => device.isAvailable && device.name.startsWith("iPhone")); | |
| if (!phone) throw new Error("No iPhone simulator is installed."); | |
| console.log(`MODEX_IOS_DESTINATION=platform=iOS Simulator,id=${phone.udid}`); | |
| console.log(`MODEX_IOS_DERIVED_DATA=${process.env.RUNNER_TEMP}/modex-ios-tests`); | |
| JS | |
| - name: Use the on-screen keyboard in the simulator | |
| # With a hardware keyboard connected the simulator hides the software keyboard, so | |
| # `app.keyboards` stays empty after a field takes focus (see typeTextWhenReady). Set before | |
| # the first xcodebuild boots the simulator; CI only, so local Simulator settings are untouched. | |
| run: | | |
| defaults write com.apple.iphonesimulator ConnectHardwareKeyboard -bool false | |
| defaults read com.apple.iphonesimulator ConnectHardwareKeyboard | |
| - name: Native unit tests | |
| working-directory: apps/ios/ModexCompanion | |
| run: | | |
| xcodegen generate | |
| xcodebuild -quiet -project ModexCompanion.xcodeproj -scheme ModexCompanion \ | |
| -destination "$MODEX_IOS_DESTINATION" -derivedDataPath "$MODEX_IOS_DERIVED_DATA" \ | |
| -parallel-testing-enabled NO -only-testing:ModexCompanionTests CODE_SIGNING_ALLOWED=NO test | |
| - name: Paired iPhone end-to-end test | |
| run: apps/ios/ModexCompanion/Scripts/test-e2e.sh | |
| - name: Upload iPhone test results | |
| if: always() | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: iphone-test-results | |
| path: | | |
| ${{ runner.temp }}/modex-ios-tests/Logs/Test | |
| ~/Library/Developer/Xcode/DerivedData/ModexCompanion-*/Logs/Test | |
| if-no-files-found: ignore | |
| retention-days: 7 | |
| test: | |
| name: unit + e2e (macOS) | |
| runs-on: macos-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Install | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Unit tests (core + desktop + site) | |
| run: npm test | |
| - name: Install browser for browser-dev e2e | |
| run: npx playwright install chromium | |
| working-directory: apps/desktop | |
| # Both Electron and browser dev use the offline mock backend; no CLI login is needed. | |
| - name: E2E (Electron and browser) | |
| run: npx playwright test | |
| working-directory: apps/desktop | |
| env: | |
| CI: "1" | |
| MODEX_TEST_OPEN_KNOWLEDGE: "1" | |
| - name: Landing page release and responsive tests | |
| run: npm run test:e2e -w @modex/site | |
| - name: Upload e2e artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: e2e-results | |
| path: | | |
| apps/desktop/test-results | |
| apps/site/test-results | |
| if-no-files-found: ignore | |
| retention-days: 7 |