b187feb37d
Use xcpretty-actions-formatter
56 lines
1.5 KiB
YAML
56 lines
1.5 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
os: [macos-latest, ubuntu-18.04]
|
|
swift-version: [5.3, 5.1]
|
|
name: Swift ${{ matrix.swift-version }} on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Remove .swift-version file
|
|
run: rm .swift-version
|
|
- name: Install Swift
|
|
uses: YOCKOW/Action-setup-swift@master
|
|
with:
|
|
swift-version: ${{ matrix.swift-version }}
|
|
- name: Build
|
|
run: |
|
|
swift --version
|
|
swift build --enable-test-discovery
|
|
- name: Test
|
|
run: swift test --enable-test-discovery --parallel
|
|
|
|
xcode:
|
|
name: Xcode project and Cocoapod
|
|
runs-on: macos-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Test Xcodeproject in Xcode 11.7
|
|
run: |
|
|
set -eo pipefail
|
|
gem install xcpretty-actions-formatter
|
|
sudo xcode-select -s /Applications/Xcode_11.7.app
|
|
xcodebuild -version
|
|
xcodebuild test -scheme SwiftShell | xcpretty -f `xcpretty-actions-formatter`
|
|
- name: Test Xcodeproject in Xcode 12
|
|
run: |
|
|
set -eo pipefail
|
|
sudo xcode-select -s /Applications/Xcode_12.app
|
|
xcodebuild -version
|
|
xcodebuild test -scheme SwiftShell | xcpretty -f `xcpretty-actions-formatter`
|
|
- name: Test Cocoapod
|
|
run: |
|
|
pod repo update --silent
|
|
pod lib lint --allow-warnings
|