Fix freezes when opening large Lua files #354
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: iOS CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: SwiftData Migration Safety Check | |
| run: bash scripts/lint_swiftdata_migration.sh origin/${{ github.base_ref || 'develop' }}..HEAD | |
| - name: CollectionView Crash Risk Check | |
| run: bash scripts/lint_collectionview_risks.sh | |
| - name: App/View init() Side-Effect Check | |
| run: bash scripts/lint_app_init_side_effects.sh | |
| test: | |
| name: Build & Test | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Select Latest Xcode | |
| run: sudo xcode-select -s "$(ls -d /Applications/Xcode*.app | sort -V | tail -1)/Contents/Developer" | |
| - name: Install XcodeGen | |
| run: brew install xcodegen | |
| - name: Generate Xcode Project | |
| run: xcodegen generate | |
| - name: Determine Simulator | |
| run: | | |
| SIMULATOR=$(xcrun simctl list devices available \ | |
| | grep -oE 'iPhone [0-9]+' \ | |
| | sort -t ' ' -k2 -n \ | |
| | tail -1) | |
| if [ -z "$SIMULATOR" ]; then | |
| echo "::error::No available iPhone simulator found" | |
| exit 1 | |
| fi | |
| echo "Using simulator: $SIMULATOR" | |
| echo "SIMULATOR=$SIMULATOR" >> "$GITHUB_ENV" | |
| - name: Build and Test | |
| run: | | |
| xcodebuild test \ | |
| -project Palvia.xcodeproj \ | |
| -scheme Palvia \ | |
| -testPlan Palvia \ | |
| -destination "platform=iOS Simulator,name=$SIMULATOR,OS=latest" \ | |
| -resultBundlePath TestResults \ | |
| CODE_SIGN_IDENTITY="" \ | |
| CODE_SIGNING_REQUIRED=NO \ | |
| CODE_SIGNING_ALLOWED=NO | xcpretty --color && exit ${PIPESTATUS[0]} | |
| - name: Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: TestResults | |
| path: TestResults.xcresult | |
| ui-test: | |
| name: UI Tests | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Select Latest Xcode | |
| run: sudo xcode-select -s "$(ls -d /Applications/Xcode*.app | sort -V | tail -1)/Contents/Developer" | |
| - name: Install XcodeGen | |
| run: brew install xcodegen | |
| - name: Generate Xcode Project | |
| run: xcodegen generate | |
| - name: Determine Simulator | |
| run: | | |
| SIMULATOR=$(xcrun simctl list devices available \ | |
| | grep -oE 'iPhone [0-9]+' \ | |
| | sort -t ' ' -k2 -n \ | |
| | tail -1) | |
| if [ -z "$SIMULATOR" ]; then | |
| echo "::error::No available iPhone simulator found" | |
| exit 1 | |
| fi | |
| echo "Using simulator: $SIMULATOR" | |
| echo "SIMULATOR=$SIMULATOR" >> "$GITHUB_ENV" | |
| - name: Run UI Tests | |
| run: | | |
| xcodebuild test \ | |
| -project Palvia.xcodeproj \ | |
| -scheme Palvia \ | |
| -testPlan PalviaUITests \ | |
| -destination "platform=iOS Simulator,name=$SIMULATOR,OS=latest" \ | |
| -resultBundlePath UITestResults \ | |
| CODE_SIGN_IDENTITY="" \ | |
| CODE_SIGNING_REQUIRED=NO \ | |
| CODE_SIGNING_ALLOWED=NO | xcpretty --color && exit ${PIPESTATUS[0]} | |
| - name: Upload UI Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: UITestResults | |
| path: UITestResults.xcresult |