This repository has been archived by the owner on Oct 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
102 lines (94 loc) · 2.21 KB
/
.gitlab-ci.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
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
---
stages:
- lint
- test
variables:
LANG: en_US.UTF-8
LANGUAGE: en_US.UTF-8
LC_ALL: en_US.UTF-8
GIT_SUBMODULE_STRATEGY: recursive
XCODE_TARGET: VHS
XCODE_SCHEME: VHS
XCODE_PROJECT: VHS.xcodeproj
PRODUCT: Debug-iphonesimulator
swiftlint:
stage: lint
tags:
- swift-5.0
before_script:
- swiftlint version
script:
- swiftlint lint --strict
only:
- merge_requests
.test_template: &test_definition
stage: test
before_script:
- xcrun simctl list
script:
- echo "Testing on $DESTINATION"
- echo "Testing using scheme $XCODE_SCHEME"
- >
set -o pipefail &&
xcodebuild
-derivedDataPath "$PWD/derivedData"
-enableCodeCoverage YES
-scheme "$XCODE_SCHEME"
-project "$XCODE_PROJECT"
-destination "$DESTINATION"
build-for-testing | xcpretty
- >
set -o pipefail &&
xcodebuild
-derivedDataPath "$PWD/derivedData"
-enableCodeCoverage YES
-destination "$DESTINATION"
-xctestrun derivedData/Build/Products/*.xctestrun
test-without-building | xcpretty --report junit
- >
xcrun llvm-cov report
-instr-profile derivedData/Build/ProfileData/*/Coverage.profdata
"derivedData/Build/Products/${PRODUCT}/${XCODE_TARGET%%-*}.framework/${XCODE_TARGET%%-*}"
coverage: '/(\d+\.\d+)%\z/'
artifacts:
reports:
junit: build/reports/junit.xml
only:
- master
- merge_requests
iOS_10_3_x:
<<: *test_definition
variables:
DESTINATION: platform=iOS Simulator,name=iPad Pro (9.7 inch),OS=10.3.1
tags:
- swift-5.0
- iOS-10.3.1
iOS_11_4_x:
<<: *test_definition
variables:
DESTINATION: platform=iOS Simulator,name=iPad Pro (9.7-inch),OS=11.4
tags:
- swift-5.0
- iOS-11.4
iOS_12_2_x:
<<: *test_definition
variables:
DESTINATION: platform=iOS Simulator,name=iPad Pro (9.7-inch),OS=12.2
tags:
- swift-5.0
- iOS-12.2
tvOS_12_2_x:
<<: *test_definition
variables:
DESTINATION: platform=tvOS Simulator,name=Apple TV 4K,OS=12.2
PRODUCT: Debug-appletvsimulator
tags:
- swift-5.0
- tvOS-12.2
macOS:
<<: *test_definition
variables:
DESTINATION: platform=OS X,arch=x86_64
PRODUCT: Debug
tags:
- swift-5.0