Refactoring (#310) #664
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |