Skip to content

Commit

Permalink
Add workflow to check PR status
Browse files Browse the repository at this point in the history
  • Loading branch information
okhan-okbay-cko committed Aug 29, 2023
1 parent 11f9660 commit 6eece4d
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 0 deletions.
99 changes: 99 additions & 0 deletions .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
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"
noIndex: "COMPILER_INDEX_STORE_ENABLE=NO"
noSigning: "CODE_SIGNING_ALLOWED=NO"

jobs:
check-pr:
name: Check PR before merging
runs-on: macos-13

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Select Xcode
run: |
sudo xcode-select -switch /Applications/Xcode_14.3.app && /usr/bin/xcodebuild -version
- name: Log xcodebuild Version
run: |
xcodebuild -version
# - name: Run Checkout Tests
# run: |
# set -o pipefail && xcodebuild -scheme "${scheme}" test -destination "${destination}" "${noIndex}" "${noSigning}" | xcpretty
# env:
# scheme: CheckoutTests
#
# - name: Build Checkout SPM Test Project
# run: |
# set -o pipefail && xcodebuild "build" "-project" "${path}" "-scheme" "${scheme}" "-configuration" "${configuration}" "-destination" "${destination}" "${noIndex}" "${noSigning}" | xcpretty
# env:
# path: "Checkout/Samples/SPMSample/CheckoutSPMSample.xcodeproj"
# scheme: "CheckoutSPMSample"
#
#
# - name: Checkout Pod Update
# run: |
# cd Checkout/Samples/CocoapodsSample
# pod update
#
# - name: Build Checkout CocoaPods Test Project
# run: |
# set -o pipefail && xcodebuild "build" "-workspace" "${path}" "-scheme" "${scheme}" "-configuration" "${configuration}" "-destination" "${destination}" "${noIndex}" "${noSigning}" | xcpretty
# env:
# path: "Checkout/Samples/CocoapodsSample/CheckoutCocoapodsSample.xcworkspace"
# scheme: "CheckoutCocoapodsSample"
#
# - name: Run Frames Unit Tests
# run: |
# set -o pipefail && xcodebuild -scheme "${scheme}" test -destination "${destination}" "${noIndex}" "${noSigning}" | xcpretty
# env:
# scheme: "FramesTests"
#
# - name: Build Frames SPM Test Project
# run: |
# set -o pipefail && xcodebuild "build" "-project" "${path}" "-scheme" "${scheme}" "-configuration" "${configuration}" "-destination" "${destination}" "${noIndex}" "${noSigning}" | xcpretty
# env:
# path: "iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj"
# scheme: "iOS Example Frame"
#
# - name: Frames Pod Update
# run: |
# cd iOS\ Example\ Frame
# pod update
#
# - name: Build Frames CocoaPods Test Project
# run: |
# set -o pipefail && xcodebuild "build" "-workspace" "${path}" "-scheme" "${scheme}" "-configuration" "${configuration}" "-destination" "${destination}" "${noIndex}" "${noSigning}" | xcpretty
# env:
# path: "iOS Example Frame/iOS Example Frame.xcworkspace"
# scheme: "iOS Example Frame"

- name: Prepare Simulators
run: |
open -a Simulator && xcrun simctl boot 'iPhone 14 Pro'
- name: Run UI Tests
run: |
set -o pipefail && xcodebuild clean test "-project" "${path}" "-scheme" "${scheme}" "-destination" "${destination}" "-configuration" "${configuration}" "${noIndex}" "${noSigning}" | xcpretty
env:
path: "iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj"
scheme: "UITest"
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// Copyright © 2022 Checkout. All rights reserved.
//

import Accessibility
import XCTest
import Frames

Expand Down

0 comments on commit 6eece4d

Please sign in to comment.