-
-
Notifications
You must be signed in to change notification settings - Fork 8
ci: run native simulator suites on Xcode 27 runner #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b6e47f8
8810be0
f8ce332
1d0ef36
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| name: Native Simulator Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - ci/native-e2e | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '0 18 * * 0' # Weekly, Monday 03:00 JST | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: native-e2e-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| suite: | ||
| timeout-minutes: 75 | ||
| # xcode-27 preview label; Xcode 27 beta is the default toolchain on that | ||
| # image, so no DEVELOPER_DIR override is needed. | ||
| runs-on: xcode-27 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - suite: ui-shell | ||
| script: scripts/verify-native-ui-shell.sh | ||
| kana: '' | ||
| - suite: search | ||
| script: scripts/verify-native-search.sh | ||
| scenario: search | ||
| kana: kana | ||
| - suite: edge | ||
| script: scripts/verify-native-search.sh | ||
| scenario: edge | ||
| kana: '' | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: actions/setup-node@v5 | ||
| with: | ||
| node-version: 24 | ||
|
|
||
| - id: meta | ||
| run: | | ||
| xcodebuild -version | ||
| echo "xcode_version=$(xcodebuild -version | head -n 1 | tr ' ' '-')" >> "$GITHUB_OUTPUT" | ||
| echo "image_version=${ImageVersion:-unknown}" >> "$GITHUB_OUTPUT" | ||
|
Comment on lines
+45
to
+49
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| - uses: actions/cache@v5 | ||
| with: | ||
| path: ~/.npm | ||
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-node- | ||
|
|
||
| - name: Restore incremental build products | ||
| uses: actions/cache@v5 | ||
| with: | ||
| path: ${{ runner.temp }}/native-${{ matrix.suite }} | ||
| key: native-${{ matrix.suite }}-${{ steps.meta.outputs.xcode_version }}-${{ hashFiles('**/package-lock.json', 'ios/**', 'demo/ios/**', 'demo/native-*-fixture/**', 'src/**') }} | ||
| restore-keys: | | ||
| native-${{ matrix.suite }}-${{ steps.meta.outputs.xcode_version }}- | ||
|
Comment on lines
+61
to
+64
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 キャッシュ復元後のネイティブテストが再実行できない 次回実行では、 Learn moreこのキャッシュは Xcode の増分ビルド成果物だけでなく、各検証スクリプトの作業ディレクトリ全体を保存します。次回、同じキーまたは restore key が一致すると、 Example: コード変更のない翌週の定期実行では同じ完全キーがヒットします。前週の Recommended fix: キャッシュ対象を Was this helpful? React with 👍 or 👎 to provide feedback. |
||
|
|
||
| - name: Install XcodeGen | ||
| run: brew list xcodegen >/dev/null 2>&1 || brew install xcodegen | ||
|
|
||
| - run: npm ci | ||
| - run: npm ci | ||
| working-directory: './demo' | ||
|
|
||
| - name: Fetch shared simulator setup script | ||
| run: | | ||
| sha=$(jq -r '.packages["node_modules/@rdlabo/ionic-theme-utils"].resolved' package-lock.json | sed 's/.*#//') | ||
| curl -fsSL "https://raw.githubusercontent.com/rdlabo-dev/ionic-theme-utils/$sha/scripts/ci-simulator.sh" -o "$RUNNER_TEMP/ci-simulator.sh" | ||
|
|
||
| - name: Create and boot simulator | ||
| run: sh "$RUNNER_TEMP/ci-simulator.sh" "iPhone 17" "iOS 27.0" ${{ matrix.kana }} | ||
|
|
||
| - name: Run ${{ matrix.suite }} suite | ||
| run: sh ${{ matrix.script }} "$SIM_UDID" ${{ matrix.scenario }} | ||
| env: | ||
| VERIFY_ARTIFACTS_DIR: ${{ runner.temp }}/native-${{ matrix.suite }} | ||
|
|
||
| - name: Upload screenshots and logs | ||
| uses: actions/upload-artifact@v5 | ||
| if: always() | ||
| with: | ||
| name: native-${{ matrix.suite }}-screenshots | ||
| path: | | ||
| ${{ runner.temp }}/native-${{ matrix.suite }}/screenshots | ||
| ${{ runner.temp }}/native-${{ matrix.suite }}/*.log | ||
| if-no-files-found: warn | ||
| retention-days: 7 | ||
|
|
||
| - name: Upload result bundle on failure | ||
| uses: actions/upload-artifact@v5 | ||
| if: failure() | ||
| with: | ||
| name: native-${{ matrix.suite }}-xcresult | ||
| path: ${{ runner.temp }}/native-${{ matrix.suite }}/tests.xcresult | ||
| if-no-files-found: warn | ||
| retention-days: 7 | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 定期実行対象は既定ブランチに固定される
scheduleは既定ブランチ上のワークフローだけを起動し、そのブランチをチェックアウトします。想定する iOS 27 ブランチを週次検証できる構成か確認してください。Was this helpful? React with 👍 or 👎 to provide feedback.