Skip to content

Commit 9f5554f

Browse files
MOB-936 Update Continuous and deployment Workflow (#114)
* MOB-936 Update Continuous and deployment Workflow - Updated workflow for main branch to run with Xcodebuild instead of swift build - Changed the deployment of Cocoapods from MacOS to Linux and installing cocoapods on Linux machine * Fixed syntax Errors Fixed indentations
1 parent d75f205 commit 9f5554f

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,20 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v4
16-
- name: Build
17-
run: swift build -v
18-
- name: Run tests
16+
- name: Select Xcode Version
17+
uses: maxim-lobanov/setup-xcode@v1
18+
with:
19+
xcode-version: '15.3.0'
20+
21+
- name: Setup environment
22+
run: |
23+
bundle install
24+
25+
- name: Build and Run tests
1926
run: |
20-
swift test --enable-code-coverage -v
21-
xcrun llvm-cov export -format="lcov" .build/debug/PaystackSDKPackageTests.xctest/Contents/MacOS/PaystackSDKPackageTests -instr-profile .build/debug/codecov/default.profdata > info.lcov
27+
xcodebuild clean build test -scheme PaystackSDK-Package -sdk iphonesimulator17.4 -destination "OS=17.4,name=iPhone 15 Pro" -enableCodeCoverage YES CODE_SIGNING_REQUIRED=NO
28+
brew install sonar-scanner
29+
bundle exec fastlane sonar_scan
2230
env:
2331
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2432
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
@@ -35,7 +43,7 @@ jobs:
3543
- name: setup-cocoapods
3644
uses: maxim-lobanov/setup-cocoapods@v1
3745
with:
38-
version: 1.14.2
46+
version: 1.15.2
3947

4048
- name: Run pod lint for Paystack Core
4149
run: pod lib lint PaystackCore.podspec --allow-warnings

.github/workflows/deploy.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,20 @@ jobs:
4646
release_name: ${{ env.version }}
4747
body: ${{ env.body }}
4848

49+
Publish_Cocoapods:
50+
runs-on: ubuntu-latest
51+
needs: deploy
52+
steps:
53+
- name: Checkout
54+
uses: actions/checkout@v4
55+
56+
- uses: ruby/setup-ruby@v1
57+
with:
58+
ruby-version: '3.2.2'
59+
4960
- name: Deploy to Cocoapods
5061
run: |
62+
gem install cocoapods
5163
set -eo pipefail
5264
pod trunk push PaystackCore.podspec --allow-warnings
5365
pod trunk push PaystackUI.podspec --allow-warnings

0 commit comments

Comments
 (0)