-
Notifications
You must be signed in to change notification settings - Fork 19
113 lines (109 loc) · 3.58 KB
/
tests.yaml
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Tests
on:
push:
paths:
- '.github/workflows/tests.yaml'
- 'Package.swift'
- 'Sources/**/*.swift'
- 'Samples/**/*.swift'
- 'Tests/**/*.swift'
branches:
- master
pull_request:
branches:
- master
paths:
- '.github/workflows/tests.yaml'
- 'Package.swift'
- 'Sources/**/*.swift'
- 'Samples/**/*.swift'
- 'Tests/**/*.swift'
env:
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
NSUnbufferedIO: YES
iOS_DESTINATION: "platform=iOS Simulator,OS=16.2,name=iPhone 14 Pro Max"
tvOS_DESTINATION: "platform=tvOS Simulator,OS=16.1,name=Apple TV"
jobs:
SwiftBuild:
name: Swift Unit Tests
runs-on: macos-12
timeout-minutes: 10
steps:
- name: Get swift version
run: swift --version
- uses: actions/checkout@master
- name: Build
run: swift build --build-tests
- name: Test
run: swift test --parallel
XcodeBuild:
name: Xcode Unit Tests
runs-on: macos-12
timeout-minutes: 25
steps:
- uses: actions/checkout@master
- name: Build AuthFoundation
run: |
set -o pipefail
xcodebuild build \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme AuthFoundation \
-sdk iphonesimulator \
-destination "$iOS_DESTINATION" 2>&1
- name: Build OktaDirectAuth
run: |
set -o pipefail && xcodebuild build \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme OktaDirectAuth \
-sdk iphonesimulator \
-destination "$iOS_DESTINATION" 2>&1
- name: Build OktaOAuth2
run: |
set -o pipefail && xcodebuild build \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme OktaOAuth2 \
-sdk iphonesimulator \
-destination "$iOS_DESTINATION" 2>&1
- name: Build WebAuthenticationUI
run: |
set -o pipefail && xcodebuild build \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme WebAuthenticationUI \
-sdk iphonesimulator \
-destination "$iOS_DESTINATION" 2>&1
- name: Test AuthFoundation
run: |
set -o pipefail && xcodebuild test \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme AuthFoundation \
-sdk iphonesimulator \
-destination "$iOS_DESTINATION" 2>&1
- name: Test OktaDirectAuth
run: |
set -o pipefail && xcodebuild test \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme OktaDirectAuth \
-sdk iphonesimulator \
-destination "$iOS_DESTINATION" 2>&1
- name: Test OktaOAuth2
run: |
set -o pipefail && xcodebuild test \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme OktaOAuth2 \
-sdk iphonesimulator \
-destination "$iOS_DESTINATION" 2>&1
- name: Test WebAuthenticationUI
run: |
set -o pipefail && xcodebuild test \
-derivedDataPath ../Build/DerivedData \
-clonedSourcePackagesDirPath ../Build/ClonedSources \
-scheme WebAuthenticationUI \
-sdk iphonesimulator \
-destination "$iOS_DESTINATION" 2>&1