generated from segment-integrations/analytics-swift-destination-template
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.24 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
name: Swift
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
cancel_previous:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: styfle/[email protected]
with:
workflow_id: ${{ github.event.workflow.id }}
build_and_test_spm_mac:
needs: cancel_previous
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: actions/checkout@v2
- name: Build
run: swift build
- name: Run tests
run: swift test
build_and_test_ios:
needs: cancel_previous
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: actions/checkout@v2
- run: xcodebuild -scheme SegmentConsent test -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 13'
build_and_test_tvos:
needs: cancel_previous
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: actions/checkout@v2
- run: xcodebuild -scheme SegmentConsent test -sdk appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV'