Support Swift Package Manager #37
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: test | |
on: [pull_request] | |
jobs: | |
build: | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run xcodebuild | |
run: ./scripts/build-for-test.sh | |
- name: Upload artifacts for cache bulid-for-testing | |
uses: actions/upload-artifact@v2 | |
with: | |
name: build-for-testing | |
path: ./build | |
test: | |
needs: build | |
env: | |
os: '14.0' | |
strategy: | |
matrix: | |
device: [iPhone 11, iPhone 11 Pro, iPhone 11 Pro Max, iPhone 8, iPhone 8 Plus, iPhone SE (2nd generation)] | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download artifacts for cache bulid-for-testing | |
uses: actions/download-artifact@v2 | |
with: | |
name: build-for-testing | |
path: build | |
- name: Run xcodebuild test | |
run: xcodebuild test-without-building -workspace SpreadsheetView.xcworkspace -scheme SpreadsheetView -sdk iphonesimulator -configuration Release -derivedDataPath build -destination 'name=${{ matrix.device }},OS=${{ env.os }}' -enableCodeCoverage YES CONFIGURATION_TEMP_DIR=build/temp | |
- if: matrix.device == 'iPhone 11' | |
name: Upload to codecov | |
run: | | |
./scripts/codecov.rb | |
bash <(curl -s https://codecov.io/bash) -f 'coverage.txt' |