-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
74 lines (65 loc) · 1.87 KB
/
.travis.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
language: objective-c
os: osx
osx_image: xcode11.3
rvm: 2.5.3
cache:
bundler: true
directories:
- .build # Swift Package Manager
- /Users/travis/.rvm/ # RVM
- $HOME/Library/Caches/Homebrew # brew
env:
global:
- SOURCE_FOLDER_PATH="./"
- TARGET_FOLDER_PATH="./"
- GH_USER_NAME="Client Engineering Bot"
- GH_USER_EMAIL="[email protected]"
before_install:
- gem install -v 2.0.1 bundler
- bundle install && brew bundle
- ./.travis/bootstrap.sh
- ./.travis/scripts/key_decrypt.sh deployment_keys.tar deployment_keys $encrypted_6d1240be3543_key $encrypted_6d1240be3543_iv
- ./.travis/scripts/git_config.sh
stages:
- name: "Unit Tests"
if: type = push
- name: Validate
if: type = pull_request
- name: "release candidate"
if: |
type != pull_request \
AND tag IS present \
AND tag =~ ^v?\d+\.\d+\.\d+-rc\.\d+$
- name: "release"
if: |
type != pull_request \
AND tag IS present \
AND tag =~ ^v?\d+\.\d+\.\d+$
jobs:
include:
- stage: Validate
name: "Code Coverage"
script: bundle exec fastlane code_coverage --env ios
# - name: Cocoapods
# script: bundle exec fastlane lint_cocoapods
- name: "Swift Package Manager"
script: bundle exec fastlane lint_swift_package_manager
- stage: "Unit Tests"
name: iOS
before_script: xcrun simctl list -j
script: bundle exec fastlane test --env ios
- name: macOS
script: bundle exec fastlane test --env macos
- stage: "release candidate"
name: "Deploy release candidate"
script:
- ./.travis/scripts/deploy.sh release-candidate pubnub/pubnub-swift-csm
- stage: "release"
name: "Deploy release"
script:
- ./.travis/scripts/deploy.sh release pubnub/pubnub-swift-csm
before_cache:
- rvm cleanup all
- bundle clean
- swift package clean
- brew cleanup