-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 1.41 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: XCUITest
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 8 */4 * *'
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
xcode: [ '15.1', 'latest' ]
os: [ macos-latest ]
steps:
- uses: actions/checkout@v4
- 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
# beta版があるかのチェック
export XCODE_BETA_APP=`ls /Applications/ | grep Xcode_ | awk 'match($0, /.*beta.*/) {print substr($0, RSTART, RLENGTH)}' | sort -n | tail -1`
# XCODE_APP変数へのセット
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}"
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