Skip to content

Instantly share code, notes, and snippets.

@felix-larsen
Created June 9, 2021 20:50
Show Gist options
  • Save felix-larsen/bcb891a9d3328e886e12d0dc2cbd1fee to your computer and use it in GitHub Desktop.
Save felix-larsen/bcb891a9d3328e886e12d0dc2cbd1fee to your computer and use it in GitHub Desktop.
iOS App with CocoaPods Test Automation with GitHub Actions CI
name: Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
buildAndTest:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: CocoaPod Install
run: pod install
- name: Build
run: xcodebuild -workspace YourAppName.xcworkspace -scheme YourAppName -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12'
- name: Test
run: xcodebuild -workspace YourAppName.xcworkspace -scheme YourAppName -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12' test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment