Merge pull request #165 from devxoul/ci #1
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: macOS-latest | |
env: | |
SCHEME: URLNavigator-Package | |
CODECOV_PACKAGE_NAME: URLNavigator | |
strategy: | |
matrix: | |
env: | |
- sdk: iphonesimulator | |
destination: platform=iOS Simulator,name=iPhone 13 Pro,OS=latest | |
- sdk: appletvsimulator | |
destination: platform=tvOS Simulator,name=Apple TV,OS=latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: List SDKs and Devices | |
run: xcodebuild -showsdks; xcrun xctrace list devices | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest | |
- name: Build and Test | |
run: | | |
set -o pipefail | |
xcodebuild -resolvePackageDependencies | |
xcodebuild clean build test \ | |
-scheme "$SCHEME" \ | |
-sdk "$SDK" \ | |
-destination "$DESTINATION" \ | |
-configuration Debug \ | |
-enableCodeCoverage YES \ | |
-resultBundlePath "./${{ matrix.env.sdk }}.xcresult" \ | |
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty -c; | |
env: | |
SDK: ${{ matrix.env.sdk }} | |
DESTINATION: ${{ matrix.env.destination }} | |
- name: Upload coverage to Codecov | |
uses: codecov/[email protected] | |
with: | |
xcode: true | |
xcode_archive_path: "./${{ matrix.env.sdk }}.xcresult" |