This repository was archived by the owner on May 8, 2026. It is now read-only.
Discussion at a glance #168
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: iOS | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| swiftlint: | |
| name: SwiftLint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Run SwiftLint | |
| uses: norio-nomura/action-swiftlint@3.2.1 | |
| with: | |
| args: --strict | |
| test: | |
| name: Test | |
| runs-on: macos-26 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set Xcode version | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '26.0' | |
| - name: Set default scheme | |
| run: | | |
| scheme_list=$(xcodebuild -list -json | tr -d "\n") | |
| default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]") | |
| echo $default | cat >default | |
| echo Using default scheme: $default | |
| - name: Build | |
| env: | |
| scheme: ${{ 'default' }} | |
| platform: ${{ 'iOS Simulator' }} | |
| OS: ${{ '26.0.1' }} | |
| name: ${{ 'iPhone 17' }} | |
| run: | | |
| # xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959) | |
| if [ $scheme = default ]; then scheme=$(cat default); fi | |
| if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi | |
| file_to_build=`echo $file_to_build | awk '{$1=$1;print}'` | |
| xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,OS=$OS,name=$name" | |
| - name: Test | |
| env: | |
| scheme: ${{ 'default' }} | |
| platform: ${{ 'iOS Simulator' }} | |
| OS: ${{ '26.0.1' }} | |
| name: ${{ 'iPhone 17' }} | |
| run: | | |
| # xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959) | |
| if [ $scheme = default ]; then scheme=$(cat default); fi | |
| if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi | |
| file_to_build=`echo $file_to_build | awk '{$1=$1;print}'` | |
| xcodebuild test-without-building -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,OS=$OS,name=$name" |