build.yml CI/CD update current github runner env #96
Workflow file for this run
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
# test.yml | |
# Unit Test | |
name: Unit Test | |
'on': | |
pull_request: | |
paths: | |
- '**.swift' | |
- '**.xcodeproj' | |
- '**.m' | |
- '**.h' | |
- '**.podspec' | |
- Podfile | |
- Podfile.lock | |
- '**/test.yml' | |
jobs: | |
swiftpm: | |
name: Test iOS (swiftpm) | |
runs-on: macOS-latest | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: iOS - Swift PM | |
run: | | |
pod install | |
set -o pipefail && swift test --parallel | |
XCode: | |
name: Test iOS | |
runs-on: macOS-latest | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer | |
strategy: | |
matrix: | |
run-config: | |
- scheme: Hero | |
platform: iOS | |
- scheme: Hero (tvOS) | |
platform: tvOS | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: CocoaPods - ${{ matrix.run-config.destination }} | |
run: | | |
pod install | |
- name: Test - ${{ matrix.run-config.platform }} | |
uses: mxcl/xcodebuild@v2.0 | |
with: | |
platform: ${{ matrix.run-config.platform }} | |
action: test | |
code-coverage: true | |
configuration: Debug | |
scheme: ${{ matrix.run-config.scheme }} | |
workspace: Hero.xcworkspace | |
- name: Upload Code Coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage1.xml,./coverage2.xml # optional | |
flags: unittests # optional | |
name: codecov-umbrella # optional | |
fail_ci_if_error: false # optional (default = false) | |
verbose: false # optional (default = false) |