Skip to content

Instantly share code, notes, and snippets.

@syxc
Forked from felix-larsen/buildAndTest.yaml
Created May 14, 2024 05:09
Show Gist options
  • Save syxc/44b835ab6d179d5edfbe3b379d97345d to your computer and use it in GitHub Desktop.
Save syxc/44b835ab6d179d5edfbe3b379d97345d 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