Skip to content

XCUITest

XCUITest #162

Workflow file for this run

name: XCUITest
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 8 */4 * *'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
xcode: [ '14.1', 'latest' ]
os: [ macos-latest ]
steps:
- uses: actions/checkout@v4
- name: Cache bundle directory
uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: bundler
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: set Xcode Version ${{ matrix.xcode }}
run: |
if [ "${{ matrix.xcode }}" = 'latest' ]; then
export XCODE_BETA_APP=`ls /Applications/ | grep Xcode_ | awk 'match($0, /.*beta.*/) {print substr($0, RSTART, RLENGTH-9)}' | sort -n | tail -1`
if [ "${XCODE_BETA_APP}" = "" ]; then
export XCODE_APP=`ls /Applications/ | grep Xcode_ | awk '$0 ~ /.*\.app/' | sort -n | tail -1`
else
export XCODE_APP="${XCODE_BETA_APP}_beta.app"
fi
else
export XCODE_APP="Xcode_${{ matrix.xcode }}.app"
fi
echo "set: ${XCODE_APP}"
echo "XCODE_VERSION=${XCODE_APP}" >> $GITHUB_ENV
- name: run test with ${{ matrix.xcode }}
run: |
echo "set: ${XCODE_VERSION}"
DEVELOPER_DIR="/Applications/${XCODE_VERSION}/Contents/Developer" bundle exec fastlane test