Skip to content

Get KIF CI working reliably with Xcode 14.3.1 & 15.4 #345

Get KIF CI working reliably with Xcode 14.3.1 & 15.4

Get KIF CI working reliably with Xcode 14.3.1 & 15.4 #345

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
jobs:
validate_spec:
runs-on: macos-latest
steps:
- name: Checkout Project
uses: actions/checkout@v1
- name: Validate podspec
run: pod lib lint
build_macos14:
runs-on: macos-14
strategy:
matrix:
run-config:
- { xcode_version: '14.3.1', simulator: 'name=iPad Air (5th generation),OS=16.4', run_extra_validations: 'false' }
- { xcode_version: '14.3.1', simulator: 'name=iPhone 14,OS=16.4', run_extra_validations: 'false' }
- { xcode_version: '15.4', simulator: 'name=iPad Air (5th generation),OS=17.5', run_extra_validations: 'false' }
- { xcode_version: '15.4', simulator: 'name=iPhone 15,OS=17.5', run_extra_validations: 'true' }
steps:
- name: Checkout Project
uses: actions/checkout@v1
- name: Brew Update
run: brew update
- name: Install Bundler
run: gem install bundler
- name: Install Core Utils
run: if [ -z "$(brew ls --versions coreutils)" ] ; then brew install coreutils ; fi
- name: Install XCPretty
run: gem install xcpretty --no-document --quiet
- name: Show Xcode versions
run: ls -al /Applications/Xcode*
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.run-config['xcode_version'] }}.app
- name: Current Xcode Selected
run: xcode-select -p
- name: List Simulators
run: xcrun simctl list
- name: Build & Test
run: ./scripts/ci.sh "${{ matrix.run-config['simulator'] }}" "${{ matrix.run-config['run_extra_validations'] }}"
- name: List results folder contents
run: ls -laR results/
if: success() || failure()
- name: Attach Test KIF Results
id: attach_kif_results
uses: kishikawakatsumi/xcresulttool@v1
with:
path: results/KIF.xcresult
upload-bundles: failure
if: success() || failure()
- name: Attach Extra Validation Test Results
uses: kishikawakatsumi/xcresulttool@v1
with:
path: |
results/KIFFrameworkConsumerTests.xcresult
results/SPMIntegration.xcresult
results/Testable.xcresult
results/TestableSwift.xcresult
results/Calculator.xcresult
if: (success() || failure()) && steps.attach_kif_results.outcome == 'success' && ${{ matrix.run-config['run_extra_validations'] == 'true' }}