Update swift.yml #279
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-13 | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer | |
XCODE_PROJECT: Nivelir.xcodeproj | |
IOS_SCHEME: Nivelir iOS | |
IOS_DESTINATION: OS=17.2,name=iPhone 15 | |
IOS_RESULT_PATH: xcodebuild-ios.xcresult | |
TVOS_SCHEME: Nivelir tvOS | |
TVOS_DESTINATION: OS=17.2,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: 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-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
- name: Bundler | |
run: | | |
gem install bundler | |
bundle install --without=documentation | |
- name: Linting | |
run: bundle exec pod lib lint --skip-tests --allow-warnings | |
SPM: | |
name: Swift Package Manager | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: swift build |