-
Notifications
You must be signed in to change notification settings - Fork 225
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
Showing
6 changed files
with
76 additions
and
34 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,60 @@ | ||
name: Test | ||
description: Build and test the library for a given Xcode version and platform | ||
inputs: | ||
xcode: | ||
description: 'The version of Xcode to use' | ||
required: true | ||
platform: | ||
description: 'The platform to build for' | ||
required: true | ||
scheme: | ||
description: 'The scheme to build' | ||
required: true | ||
runs: | ||
using: composite | ||
shell: bash -euo pipefail | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set Ruby version | ||
run: ruby -e 'puts RUBY_VERSION' | tee .ruby-version | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
cache-version: 1 | ||
- name: Install Carthage | ||
run: brew install carthage | ||
- name: Install Swiftlint | ||
run: brew install swiftlint | ||
- name: Setup Xcode | ||
uses: mxcl/xcodebuild@v2 | ||
with: | ||
xcode: ${{ inputs.xcode }} | ||
action: none | ||
- name: Save Xcode version | ||
run: xcodebuild -version | tee .xcode-version | ||
- id: restore-carthage-cache | ||
name: Restore Carthage cache | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: Carthage | ||
key: v1-carthage-${{ hashFiles('.xcode-version') }}-${{ hashFiles('Cartfile.resolved') }} | ||
- name: Install dependencies | ||
if: steps.restore-carthage-cache.outputs.cache-hit != 'true' | ||
run: carthage bootstrap --platform ${{ inputs.platform }} --no-use-binaries --cache-builds | ||
- name: Save Carthage cache | ||
id: save-carthage-cache | ||
uses: actions/cache/save@v3 | ||
if: steps.restore-carthage-cache.outputs.cache-hit != 'true' | ||
with: | ||
path: Carthage | ||
key: v1-carthage-${{ hashFiles('.xcode-version') }}-${{ hashFiles('Cartfile.resolved') }} | ||
- name: Run tests | ||
uses: mxcl/xcodebuild@v2 | ||
with: | ||
xcode: ${{ inputs.xcode }} | ||
platform: ${{ inputs.platform }} | ||
scheme: ${{ inputs.scheme }} | ||
code-coverage: true | ||
configuration: release |
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,13 @@ | ||
name: Test | ||
on: | ||
[push] | ||
jobs: | ||
ios: | ||
name: Build and test on iOS | ||
runs-on: macos-latest | ||
steps: | ||
- uses: ./.github/actions/test | ||
with: | ||
xcode: '14.2' | ||
platform: iOS | ||
scheme: Auth0.iOS |
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
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
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
// swiftlint:disable file_length | ||
|
||
#if WEB_AUTH_PLATFORM | ||
import Foundation | ||
import Combine | ||
|
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