forked from crowdin/mobile-sdk-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
97 lines (91 loc) · 2.61 KB
/
azure-pipelines.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
# Xcode
# Build, test, and archive an Xcode workspace on macOS.
# Add steps that install certificates, test, sign, and distribute the app, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/xcode
trigger:
branches:
include:
- refs/heads/*
exclude:
- refs/tags/*
paths:
exclude:
- README.md
- LICENSE
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
variables:
image: 'macOS-latest'
xCode: 'default'
jobs:
- job: DangerSwiftLint
continueOnError: true
pool:
vmImage: $(image)
steps:
- bash: |
brew install swiftlint ; brew install danger/tap/danger-swift ; export DANGER_GITHUB_API_TOKEN='$(DANGER_GITHUB_API_TOKEN)' ; danger-swift ci
displayName: 'Danger SwiftLint'
- job: PodLint
dependsOn: DangerSwiftLint
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
pool:
vmImage: $(image)
steps:
- task: CocoaPods@0
inputs:
projectDirectory: Example
- bash: |
pod lib lint --skip-tests
displayName: 'Lint pod library'
- job: Build
dependsOn: DangerSwiftLint
condition: succeeded()
pool:
vmImage: $(image)
steps:
- task: CocoaPods@0
inputs:
projectDirectory: Example
- task: Xcode@5
displayName: 'Build Xcode App'
inputs:
actions: 'build'
sdk: 'iphoneos'
scheme: 'AppleReminders'
configuration: 'Debug'
xcWorkspacePath: 'Example/AppleReminders.xcworkspace'
xcodeVersion: $(xCode)
packageApp: false
useXcpretty: true
- job: Test
dependsOn: Build
condition: succeeded()
pool:
vmImage: $(image)
steps:
- checkout: self
persistCredentials: true
- task: CocoaPods@0
inputs:
projectDirectory: Tests
- task: Xcode@5
displayName: 'Running tests'
inputs:
actions: 'test'
sdk: 'iphonesimulator'
configuration: 'Debug'
xcWorkspacePath: 'Tests/Tests.xcworkspace'
scheme: 'Tests'
xcodeVersion: $(xCode)
publishJUnitResults: true
destinationPlatformOption: 'iOS'
destinationTypeOption: 'simulators'
destinationSimulators: 'iPhone 8'
- bash: |
cd Tests & bash <(curl -s https://codecov.io/bash) -t $(CODECOV_TOKEN)
displayName: 'Upload coverage to codecov.io'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/junit.xml'
displayName: 'Publish tests results'