forked from SwifterSwift/SwifterSwift
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (86 loc) · 3.09 KB
/
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
name: SwifterSwift
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
Darwin:
name: Darwin
runs-on: macos-latest
env:
PROJECT: SwifterSwift.xcodeproj
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
steps:
- uses: actions/checkout@v1
- name: Bundle Install
run: bundle install
- name: Brew Upgrade
run: |
brew update-reset
brew bundle --no-upgrade
- name: Test iOS
run: |
xcodebuild clean build test -project $PROJECT -scheme $SCHEME -destination "$DESTINATION" | XCPRETTY_JSON_FILE_OUTPUT="xcodebuild-ios.json" xcpretty -f `xcpretty-json-formatter`
bash <(curl -s https://codecov.io/bash) -cF ios -J 'SwifterSwift'
env:
SCHEME: SwifterSwift-iOS
DESTINATION: platform=iOS Simulator,name=iPhone 11
- name: Test MacOS
run: |
xcodebuild clean build test -project $PROJECT -scheme $SCHEME -destination "$DESTINATION" | XCPRETTY_JSON_FILE_OUTPUT="xcodebuild-macos.json" xcpretty -f `xcpretty-json-formatter`
bash <(curl -s https://codecov.io/bash) -cF macos -J 'SwifterSwift'
env:
SCHEME: SwifterSwift-macOS
DESTINATION: platform=OS X
- name: Test TVOS
run: |
xcodebuild clean build test -project $PROJECT -scheme $SCHEME -destination "$DESTINATION" | XCPRETTY_JSON_FILE_OUTPUT="xcodebuild-tvos.json" xcpretty -f `xcpretty-json-formatter`
bash <(curl -s https://codecov.io/bash) -cF tvos -J 'SwifterSwift'
env:
SCHEME: SwifterSwift-tvOS
DESTINATION: platform=tvOS Simulator,name=Apple TV 4K (at 1080p)
- name: Build WatchOS
run: xcodebuild clean build -project $PROJECT -scheme $SCHEME -destination "$DESTINATION"
env:
SCHEME: SwifterSwift-watchOS
DESTINATION: name=Apple Watch Series 5 - 40mm
- name: Danger Swift
# Hack to by pass the key invalidation mechanism
# See for more info: https://github.community/t5/GitHub-Actions/Make-secrets-available-to-builds-of-forks/td-p/30678
run: |
export DANGER_GITHUB_API_TOKEN=$(echo bd3b560e741b854e0c49b4f6a66d82418ab7e1fb | rev)
bundle exec danger --verbose
Swiftlint:
runs-on: macos-latest
name: SwiftLint
steps:
- uses: actions/checkout@v1
- name: SwiftLint
run: |
brew update-reset
brew bundle --no-upgrade
swiftlint
CocoaPods:
name: CocoaPods
runs-on: macos-latest
strategy:
matrix:
platform: ['ios', 'macos', 'tvos', 'watchos']
env:
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
steps:
- uses: actions/checkout@v1
- name: Bundle Install
run: bundle install
- name: CocoaPods ${{ matrix.platform }}
run: bundle exec pod lib lint --skip-tests --allow-warnings --verbose --platforms=${{ matrix.platform }}
Linux:
runs-on: [ubuntu-18.04]
container: swift:5.3.3
steps:
- uses: actions/checkout@v1
- name: Linux
run: swift test --enable-test-discovery --parallel