-
Notifications
You must be signed in to change notification settings - Fork 9
76 lines (71 loc) · 2.32 KB
/
swift.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
name: "CI"
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
LC_CTYPE: en_US.UTF-8
LANG: en_US.UTF-8
jobs:
BuildAndTests:
name: Build & Tests
runs-on: macOS-14
env:
DEVELOPER_DIR: /Applications/Xcode_16.0.app/Contents/Developer
XCODE_PROJECT: Nivelir.xcodeproj
IOS_SCHEME: Nivelir iOS
IOS_DESTINATION: OS=18.0,name=iPhone 16
IOS_RESULT_PATH: xcodebuild-ios.xcresult
TVOS_SCHEME: Nivelir tvOS
TVOS_DESTINATION: OS=18.0,name=Apple TV
TVOS_RESULT_PATH: xcodebuild-tvos.xcresult
SKIP_SWIFTLINT: YES
SWIFTLINT_VERSION: 0.52.2
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
- name: List available Xcode versions
run: ls /Applications | grep Xcode
- name: Bundler
run: |
gem install bundler
bundle install --without=documentation
- name: Preparation
run: |
set -o pipefail
swift --version
- name: Test iOS
run: |
xcodebuild clean build test -project "$XCODE_PROJECT" -scheme "$IOS_SCHEME" -destination "$IOS_DESTINATION" -resultBundlePath "$IOS_RESULT_PATH" | xcpretty -f `xcpretty-json-formatter`
bash <(curl -s https://codecov.io/bash) -cF ios -J 'Nivelir'
- name: Test tvOS
run: |
xcodebuild clean build test -project "$XCODE_PROJECT" -scheme "$TVOS_SCHEME" -destination "$TVOS_DESTINATION" -resultBundlePath "$TVOS_RESULT_PATH" | xcpretty -f `xcpretty-json-formatter`
bash <(curl -s https://codecov.io/bash) -cF tvos -J 'Nivelir'
- name: Danger
run: bundle exec danger --remove-previous-comments
Cocoapods:
name: Cocoapods
runs-on: macOS-14
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
- name: Bundler
run: |
gem install bundler
bundle install --without=documentation
- name: Switch Xcode version
run: sudo xcode-select --switch /Applications/Xcode_16.0.app
- name: Linting
run: bundle exec pod lib lint --skip-tests --allow-warnings
SPM:
name: Swift Package Manager
runs-on: macOS-14
steps:
- uses: actions/checkout@v3
- name: Build
run: swift build