Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOB-936 Update Continuous and deployment Workflow #114

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,20 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Build
run: swift build -v
- name: Run tests
- name: Select Xcode Version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.3.0'

- name: Setup environment
run: |
bundle install

- name: Build and Run tests
run: |
swift test --enable-code-coverage -v
xcrun llvm-cov export -format="lcov" .build/debug/PaystackSDKPackageTests.xctest/Contents/MacOS/PaystackSDKPackageTests -instr-profile .build/debug/codecov/default.profdata > info.lcov
xcodebuild clean build test -scheme PaystackSDK-Package -sdk iphonesimulator17.4 -destination "OS=17.4,name=iPhone 15 Pro" -enableCodeCoverage YES CODE_SIGNING_REQUIRED=NO
brew install sonar-scanner
bundle exec fastlane sonar_scan
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand All @@ -35,7 +43,7 @@ jobs:
- name: setup-cocoapods
uses: maxim-lobanov/setup-cocoapods@v1
with:
version: 1.14.2
version: 1.15.2

- name: Run pod lint for Paystack Core
run: pod lib lint PaystackCore.podspec --allow-warnings
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,20 @@ jobs:
release_name: ${{ env.version }}
body: ${{ env.body }}

Publish_Cocoapods:
runs-on: ubuntu-latest
needs: deploy
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.2'

- name: Deploy to Cocoapods
run: |
gem install cocoapods
set -eo pipefail
pod trunk push PaystackCore.podspec --allow-warnings
pod trunk push PaystackUI.podspec --allow-warnings
Expand Down
Loading