-
Notifications
You must be signed in to change notification settings - Fork 75
34 lines (25 loc) · 1.12 KB
/
build-and-test.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
name: Build and test
on: pull_request
jobs:
run-tests-job:
runs-on: macos-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
with:
xcode-version: latest-stable
- name: Setup Ruby and xcpretty
run: |
gem install erb
gem install xcpretty
- name: List Available Simulators
run: xcrun simctl list
- name: Build and test
run: |
DEVICE_ID=$(xcrun simctl list devices | grep "iPhone 16 Pro" | head -1 | awk -F'[()]' '{print $2}')
xcrun simctl boot "$DEVICE_ID"
xcodebuild test -project swift-sdk.xcodeproj -scheme swift-sdk -sdk iphonesimulator -destination "id=$DEVICE_ID" -enableCodeCoverage YES CODE_SIGNING_REQUIRED=NO | xcpretty && exit ${PIPESTATUS[0]}
- name: CocoaPods lint
run: pod lib lint --allow-warnings
- name: Upload coverage report to codecov.io
run: bash <(curl -s https://codecov.io/bash) -X gcov -J 'IterableSDK' -J 'IterableAppExtensions'