add first workflow (#45)

* add first workflow
* prepare cocoapods
add pod install step before running tests
* Install bundle dependencies
* fix test action failure
* improve test action
* cache cocoapods
* use latest cache action
* fix xcode warning
This commit is contained in:
Paul Zabelin
2020-09-08 21:39:32 -07:00
committed by GitHub
parent b19dd3e7ff
commit 49dce4e3c8
4 changed files with 48 additions and 13 deletions

View File

@@ -0,0 +1,25 @@
name: Build and Test
on: [push, pull_request]
jobs:
iOS:
name: Test iOS
runs-on: macOS-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v2.3.2
- uses: actions/cache@v2.1.1
id: load-cache
with:
path: Example/Pods
key: macos-pods-${{ hashFiles('**/Podfile.lock') }}
- name: Install Cocoapods dependencies
if: steps.load-cache.outputs.cache-hit != 'true'
run: pod install --project-directory=Example
- name: All Tests
uses: sersoft-gmbh/xcodebuild-action@v1.1
with:
workspace: Example/PerspectiveTransform.xcworkspace
scheme: Example
destination: platform=iOS Simulator,name=iPhone 11 Pro
- name: Report coverage
run: bash <(curl -s 'https://codecov.io/bash') -Z -J '^PerspectiveTransform$' -X gcov -X fix