-
Notifications
You must be signed in to change notification settings - Fork 47
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
11f9660
commit 6978ae7
Showing
1 changed file
with
100 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,100 @@ | ||
name: Check PR | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'develop' | ||
- 'release/*' | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
branches: | ||
- 'main' | ||
- 'develop' | ||
- 'release/*' | ||
|
||
env: | ||
destination: "platform=iOS Simulator,name=iPhone 14 Pro,OS=latest" | ||
configuration: "Debug" | ||
xcpretty: "xcpretty" | ||
|
||
jobs: | ||
check-pr: | ||
name: Check PR before merging | ||
runs-on: macos-13 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Select Xcode version | ||
uses: maxim-lobanov/setup-xcode@9a697e2b393340c3cacd97468baa318e4c883d98 | ||
with: | ||
xcode-version: '14.3' | ||
|
||
- name: Log xcodebuild Version | ||
run: | | ||
xcodebuild -version | ||
- name: Run Checkout Tests | ||
run: | | ||
set -o pipefail && xcodebuild -scheme "${scheme}" test -destination "${destination}" | "${xcpretty}" | ||
env: | ||
scheme: CheckoutTests | ||
|
||
- name: Build Checkout SPM Test Project | ||
run: | | ||
set -o pipefail && xcodebuild "build" "${type-flag}" "${path}" "-scheme" "${scheme}" "-configuration" "${configuration}" "-destination" "${destination}" | "${xcpretty}" | ||
env: | ||
path: "Checkout/Samples/SPMSample/CheckoutSPMSample.xcodeproj" | ||
scheme: "CheckoutSPMSample" | ||
type-flag: "-project" | ||
|
||
|
||
- name: Checkout Pod Update | ||
run: | | ||
cd Checkout/Samples/CocoapodsSample | ||
pod update | ||
- name: Build Checkout CocoaPods Test Project | ||
run: | | ||
set -o pipefail && xcodebuild "build" "${type-flag}" "${path}" "-scheme" "${scheme}" "-configuration" "${configuration}" "-destination" "${destination}" | "${xcpretty}" | ||
env: | ||
path: "Checkout/Samples/CocoapodsSample/CheckoutCocoapodsSample.xcworkspace" | ||
scheme: "CheckoutCocoapodsSample" | ||
type-flag: "-workspace" | ||
|
||
- name: Run Frames Unit Tests | ||
run: | | ||
set -o pipefail && xcodebuild -scheme "${scheme}" test -destination "${destination}" | "${xcpretty}" | ||
env: | ||
scheme: "FramesTests" | ||
|
||
- name: Build Frames SPM Test Project | ||
run: | | ||
set -o pipefail && xcodebuild "build" "${type-flag}" "${path}" "-scheme" "${scheme}" "-configuration" "${configuration}" "-destination" "${destination}" | "${xcpretty}" | ||
env: | ||
path: "iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj" | ||
scheme: "iOS Example Frame" | ||
type-flag: "-project" | ||
|
||
- name: Frames Pod Update | ||
run: | | ||
cd iOS\ Example\ Frame | ||
pod update | ||
- name: Build Frames CocoaPods Test Project | ||
run: | | ||
set -o pipefail && xcodebuild "build" "${type-flag}" "${path}" "-scheme" "${scheme}" "-configuration" "${configuration}" "-destination" "${destination}" | "${xcpretty}" | ||
env: | ||
path: "iOS Example Frame/iOS Example Frame.xcworkspace" | ||
scheme: "iOS Example Frame" | ||
type-flag: "-workspace" | ||
|
||
- name: Run UI Tests | ||
run: | | ||
set -o pipefail | ||
xcodebuild "test" "-project" "${path}" "-scheme" "${scheme}" "-destination" "${destination}" | "${xcpretty}" | ||
env: | ||
path: "iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj" | ||
scheme: "UITest" |