-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (67 loc) · 2.48 KB
/
swift.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Swift
on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
jobs:
build_spm:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Build
run: swift build --target TripKit
build_xcode:
runs-on: macos-12
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: actions/checkout@v3
- name: Build TripKit Mac
run: xcodebuild build -quiet -project TripKit.xcodeproj -scheme "TripKit-macOS"
- name: Build TripKitUI iOS
run: xcodebuild build -quiet -project TripKit.xcodeproj -scheme "TripKitUI-iOS" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14'
- name: Build TripKitInterApp iOS
run: xcodebuild build -quiet -project TripKit.xcodeproj -scheme "TripKitInterApp-iOS" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14'
test_xcode:
runs-on: macos-12
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: actions/checkout@v3
- name: Run tests
env:
TRIPGO_API_KEY: ${{ secrets.TRIPGO_API_KEY }}
DATADOG_CLIENT_TOKEN: ${{ secrets.DATADOG_CLIENT_TOKEN }}
DD_TEST_RUNNER: 1
DD_ENV: ci
DD_SERVICE: tripkit-ios
run: |
xcodebuild test -quiet -project TripKit.xcodeproj -scheme "TripKit-iOS" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14' -resultBundlePath TestResults
- uses: kishikawakatsumi/[email protected]
with:
path: TestResults.xcresult
if: success() || failure()
# ^ This is important because the action will be run
# even if the test fails in the previous step.
examples:
runs-on: macos-12
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: actions/checkout@v3
- name: Build TripKitUIExample
run: xcodebuild build -quiet -project TripKit.xcodeproj -scheme TripKitUIExample -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14'
- name: Build MiniMap
run: |
cd Examples/MiniMap
pod install
xcodebuild build -quiet -workspace MiniMap.xcworkspace -scheme MiniMap
- name: Build CocoaPodsTest
run: |
cd Examples/CocoaPodsTest
pod install
xcodebuild build -workspace CocoaPodsTest.xcworkspace -scheme CocoaPodsTest -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14'