diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04dfcf8..ef74e00 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/ci.yml~ b/.github/workflows/ci.yml~ new file mode 100644 index 0000000..04dfcf8 --- /dev/null +++ b/.github/workflows/ci.yml~ @@ -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 diff --git a/README.md b/README.md index a3d729d..306251c 100644 --- a/README.md +++ b/README.md @@ -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)