Skip to content

Commit

Permalink
Merge branch 'feature/add-tests-macos-tvos'
Browse files Browse the repository at this point in the history
  • Loading branch information
twittemb committed Mar 22, 2020
2 parents 6b88018 + 7ff2ce1 commit 3c06eaf
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,38 @@ jobs:
with:
name: build-logs-${{ github.run_id }}
path: logs
macOS:
name: "macOS"
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Generate Xcode project
run: swift package generate-xcodeproj
- name: Run Unit Tests
run: set -o pipefail && xcodebuild -project Spin.Swift.xcodeproj -scheme Spin.Swift-Package -enableCodeCoverage NO -sdk macosx -destination "arch=x86_64" test | xcpretty -c -r html --output logs/macOS.html
- name: Upload build artifacts to Github
uses: actions/upload-artifact@v1
with:
name: build-logs-${{ github.run_id }}
path: logs
tvOS:
name: "tvOS"
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Generate Xcode project
run: swift package generate-xcodeproj
- name: Run Unit Tests
run: set -o pipefail && xcodebuild -project Spin.Swift.xcodeproj -scheme Spin.Swift-Package -enableCodeCoverage NO -sdk appletvsimulator -destination "name=Apple TV" test | xcpretty -c -r html --output logs/tvOS.html
- name: Upload build artifacts to Github
uses: actions/upload-artifact@v1
with:
name: build-logs-${{ github.run_id }}
path: logs
SPM:
name: "Swift Package Manager"
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Run tests
run: set -o pipefail && swift test
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml~
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Tests

on: [push]

jobs:
iOS:
name: "iOS"
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Generate Xcode project
run: swift package generate-xcodeproj
- name: Run Unit Tests
run: set -o pipefail && xcodebuild -project Spin.Swift.xcodeproj -scheme Spin.Swift-Package -enableCodeCoverage YES -sdk iphonesimulator -destination "name=iPhone 11" test | xcpretty -c -r html --output logs/iOS.html
- name: Upload code coverage to Codecov.io
run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_IO_TOKEN }}
- name: Upload build artifacts to Github
uses: actions/upload-artifact@v1
with:
name: build-logs-${{ github.run_id }}
path: logs
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![](https://github.com/Spinners/Spin.Swift/workflows/Tests/badge.svg)
![](https://github.com/Spinners/Spin.Swift/workflows/SwiftLint/badge.svg)
[![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager)
![platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20macOS%20%7C%20tvOS%20%7C%20watchOS-333333.svg)
![platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20macOS%20%7C%20tvOS-333333.svg)
[![codecov](https://codecov.io/gh/Spinners/Spin.Swift/branch/master/graph/badge.svg)](https://codecov.io/gh/Spinners/Spin.Swift)

<p align="center">
Expand Down

0 comments on commit 3c06eaf

Please sign in to comment.