-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c21d27
commit e2bcd2f
Showing
2 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Set up environment | ||
description: Set up the environment for building and testing the library on a given platform | ||
|
||
inputs: | ||
xcode: | ||
description: The version of Xcode to use | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Set Ruby version | ||
run: ruby -e 'puts RUBY_VERSION' | tee .ruby-version | ||
shell: bash | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 | ||
with: | ||
bundler-cache: true | ||
cache-version: 1 | ||
|
||
- name: Setup Xcode | ||
uses: mxcl/xcodebuild@6e60022a0cbe8c89278be2dd1773a2f68e7c5c87 | ||
with: | ||
xcode: ${{ inputs.xcode }} | ||
action: none |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Run tests | ||
description: Run library tests for a given platform | ||
|
||
inputs: | ||
xcode: | ||
description: The version of Xcode to use | ||
required: true | ||
scheme: | ||
description: The Xcode scheme to use | ||
required: true | ||
platform: | ||
description: The platform to build for | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Install xcpretty | ||
run: gem install xcpretty | ||
shell: bash | ||
|
||
- name: Save Xcode version | ||
run: xcodebuild -version | tee .xcode-version | ||
shell: bash | ||
|
||
- id: restore-carthage-cache | ||
name: Restore Carthage cache | ||
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 | ||
with: | ||
path: Carthage | ||
key: carthage-${{ inputs.platform }}-${{ hashFiles('Cartfile.resolved') }}-${{ hashFiles('.xcode-version') }}-v1 | ||
|
||
- name: Install dependencies | ||
if: steps.restore-carthage-cache.outputs.cache-hit != 'true' | ||
run: carthage bootstrap --platform ${{ inputs.platform }} --use-xcframeworks --no-use-binaries --cache-builds | ||
shell: bash | ||
|
||
- name: Run tests | ||
uses: mxcl/xcodebuild@6e60022a0cbe8c89278be2dd1773a2f68e7c5c87 | ||
with: | ||
xcode: ${{ inputs.xcode }} | ||
scheme: ${{ inputs.scheme }} | ||
platform: ${{ inputs.platform }} | ||
code-coverage: true |