summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2020-06-02 14:44:53 -0400
committerNicoleYarroch <nicole@livio.io>2020-06-02 14:44:53 -0400
commit19eaea4ef0f55f64c8909a88b3fbfe1375e9dbf2 (patch)
treefe070767d56739aa3236be6c851d5b295af3da3b /.github
parentb9031f67970ce8115a8879074e10120846f889dd (diff)
downloadsdl_ios-19eaea4ef0f55f64c8909a88b3fbfe1375e9dbf2.tar.gz
Fixed spacing and added env variables
Signed-off-by: NicoleYarroch <nicole@livio.io>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/test.yml184
1 files changed, 93 insertions, 91 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 7653650c2..3e3191c51 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -2,96 +2,98 @@ name: SmartDeviceLink Unit Tests
# This workflow is triggered on a push or pull request.
on:
- push:
- branches:
- - '*'
- tags-ignore: # Don't run workflow when a tag is created
- - v*
- pull_request:
- branches:
- - '*'
+ push:
+ branches:
+ - '*'
+ tags-ignore: # Don't run workflow when a tag is created
+ - v*
+ pull_request:
+ branches:
+ - '*'
+
+env:
+ PROJECT: 'SmartDeviceLink-iOS.xcodeproj'
+ DESTINATION: 'platform=iOS Simulator,name=iPhone 11,OS=13.5'
jobs:
- build:
- name: Build Example Apps
- runs-on: macOS-latest
-
- strategy:
- fail-fast: false
- matrix:
- destination: ['platform=iOS Simulator,name=iPhone 11,OS=13.5']
- scheme: ['SmartDeviceLink-Example-ObjC', 'SmartDeviceLink-Example-Swift']
- project: ['SmartDeviceLink-iOS.xcodeproj']
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v2
- with:
- submodules: true
-
- # Print the available Xcode versions
- - name: Get available Xcode versions on the server
- run: ls /Applications | grep Xcode
-
- # Select the Xcode version (the platform/simulator/OS available for testing depend on the Xcode version)
- - name: Select Xcode version
- run: sudo xcode-select -switch /Applications/Xcode_11.5.app
-
- - name: Build
- run: |
- set -o pipefail && xcodebuild -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" build | xcpretty --color --simple
-
- test:
- name: SmartDeviceLinkTests
- runs-on: macOS-latest
-
- strategy:
- fail-fast: false
- matrix:
- destination: ['platform=iOS Simulator,name=iPhone 11,OS=13.5']
- scheme: ['SmartDeviceLink']
- project: ['SmartDeviceLink-iOS.xcodeproj']
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v2
- with:
- submodules: true
-
- - name: Checking for cached dependencies
- uses: actions/cache@v2
- id: carthage-cache
- with:
- path: Carthage
- key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
- restore-keys: |
- ${{ runner.os }}-carthage-
-
- - name: Installing dependencies
- if: steps.carthage-cache.outputs.cache-hit != 'true'
- run: |
- carthage bootstrap --no-use-binaries --platform iOS --cache-builds
-
- # Print the available Xcode versions
- - name: Get available Xcode versions on the server
- run: ls /Applications | grep Xcode
-
- # Select the Xcode version (the platform/simulator/OS available for testing depend on the Xcode version)
- - name: Select Xcode version
- run: sudo xcode-select -switch /Applications/Xcode_11.5.app
-
- # Split build into build-only and test-only as it is faster than building and running in one step
- - name: Building unit tests
- run: xcodebuild build-for-testing -project "${{ matrix.project }}" -destination "${{ matrix.destination }}" -scheme "${{ matrix.scheme }}"
-
- - name: Running unit tests
- run: |
- set -o pipefail && xcodebuild test-without-building -project "${{ matrix.project }}" -destination "${{ matrix.destination }}" -scheme "${{ matrix.scheme }}" -configuration Debug ONLY_ACTIVE_ARCH=NO RUN_CLANG_STATIC_ANALYZER=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ENABLE_TESTABILITY=YES | xcpretty --color --simple
-
- # Upload coverage reports to Codecov
- - name: Codecov
- uses: codecov/codecov-action@v1
- with:
- file: ./codecov.yml
- flags: unittests
-
+ build:
+ name: Build Example Apps
+ runs-on: macOS-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ scheme: ['SmartDeviceLink-Example-ObjC', 'SmartDeviceLink-Example-Swift']
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+ with:
+ submodules: true
+
+ # Print the available Xcode versions
+ - name: Get available Xcode versions on the server
+ run: ls /Applications | grep Xcode
+
+ # Select the Xcode version (the platform/simulator/OS available for testing depend on the Xcode version)
+ - name: Select Xcode version
+ run: sudo xcode-select -switch /Applications/Xcode_11.5.app
+
+ - name: Build
+ run: |
+ set -o pipefail && xcodebuild -scheme "${{ matrix.scheme }}" -destination "$DESTINATION" build | xcpretty --color --simple
+
+ test:
+ name: SmartDeviceLinkTests
+ runs-on: macOS-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ scheme: ['SmartDeviceLink']
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+ with:
+ submodules: true
+
+ - name: Checking for cached dependencies
+ uses: actions/cache@v2
+ id: carthage-cache
+ with:
+ path: Carthage
+ key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
+ restore-keys: |
+ ${{ runner.os }}-carthage-
+
+ - name: Installing dependencies
+ if: steps.carthage-cache.outputs.cache-hit != 'true'
+ run: |
+ carthage bootstrap --no-use-binaries --platform iOS --cache-builds
+
+ # Print the available Xcode versions
+ - name: Get available Xcode versions on the server
+ run: |
+ ls /Applications | grep Xcode
+
+ # Select the Xcode version (the platform/simulator/OS available for testing depend on the Xcode version)
+ - name: Select Xcode version
+ run: |
+ sudo xcode-select -switch /Applications/Xcode_11.5.app
+
+ # Split build into build-only and test-only as it is faster than building and running in one step
+ - name: Building unit tests
+ run: |
+ xcodebuild build-for-testing -project "$PROJECT" -destination "$DESTINATION" -scheme "${{ matrix.scheme }}"
+
+ - name: Running unit tests
+ run: |
+ set -o pipefail && xcodebuild test-without-building -project "$PROJECT" -destination "$DESTINATION" -scheme "${{ matrix.scheme }}" -configuration Debug ONLY_ACTIVE_ARCH=NO RUN_CLANG_STATIC_ANALYZER=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ENABLE_TESTABILITY=YES | xcpretty --color --simple
+
+ # Upload coverage reports to Codecov
+ - name: Codecov
+ uses: codecov/codecov-action@v1
+ with:
+ file: ./codecov.yml
+ flags: unittests