From 23329e18cc5b554117f0ba1713363a1efb422151 Mon Sep 17 00:00:00 2001 From: Rotimi Joshua <34765619+texyz@users.noreply.github.com> Date: Fri, 25 Aug 2023 09:04:01 +0100 Subject: [PATCH 1/4] Create ci-cd.yml --- .github/workflows/ci-cd.yml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/ci-cd.yml diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml new file mode 100644 index 0000000..9d02645 --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -0,0 +1,41 @@ +name: FlutterwaveSDK CI/CD Workflow + +on: + push: + branches: + - dev + pull_request: + branches: + - dev + +jobs: + build: + name: Build and Test + runs-on: macos-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up CocoaPods + run: | + gem install cocoapods + pod install + + - name: Build Framework + run: | + xcodebuild clean build -workspace FlutterwaveSDK.xcworkspace -scheme FlutterwaveSDK_Example -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 13" + + - name: Install Dependencies + run: pod install + + - name: Run Unit Tests + run: xcodebuild test -workspace FlutterwaveSDK.xcworkspace -scheme FlutterwaveSDK_Example -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 13" + + - name: Run Coverage Scan + run: slather coverage -s --scheme FlutterwaveSDK_Example FlutterwaveSDK.xcodeproj + + - name: Upload Coverage Report + uses: codecov/codecov-action@v2 + with: + token: ${{ secrets.CODECOV_TOKEN }} From 24b7b5ca4fe00039bbfd6ad203e633a586b88278 Mon Sep 17 00:00:00 2001 From: Rotimi Joshua <34765619+texyz@users.noreply.github.com> Date: Fri, 25 Aug 2023 09:16:06 +0100 Subject: [PATCH 2/4] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 9d02645..93460ec 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -4,13 +4,10 @@ on: push: branches: - dev - pull_request: - branches: - - dev jobs: - build: - name: Build and Test + build_and_publish: + name: Build, Test, and Publish runs-on: macos-latest steps: @@ -39,3 +36,18 @@ jobs: uses: codecov/codecov-action@v2 with: token: ${{ secrets.CODECOV_TOKEN }} + + - name: Update Podspec Version + run: | + # Update the version in your podspec + sed -i '' "s/s.version *= *'[^']*'/s.version = '$(git describe --tags --abbrev=0 | sed 's/v//')'/g" FlutterwaveSDK.podspec + + - name: Publish to CocoaPods + run: | + # Authenticate with CocoaPods repo using environment variables + echo -e "$POD_REPO_SECRET" | pod trunk register $POD_REPO 'your-email@example.com' --name='Your Name' --silent + pod trunk push FlutterwaveSDK.podspec --allow-warnings + +env: + POD_REPO: 'https://github.com/CocoaPods/Specs.git' + POD_REPO_SECRET: ${{ secrets.COCOAPODS_REPO_SECRET }} From 4056a6d84cdb433162175a153925cbc9e5bf5f91 Mon Sep 17 00:00:00 2001 From: Rotimi Joshua <34765619+texyz@users.noreply.github.com> Date: Fri, 25 Aug 2023 09:28:55 +0100 Subject: [PATCH 3/4] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 93460ec..b52a80e 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -45,7 +45,7 @@ jobs: - name: Publish to CocoaPods run: | # Authenticate with CocoaPods repo using environment variables - echo -e "$POD_REPO_SECRET" | pod trunk register $POD_REPO 'your-email@example.com' --name='Your Name' --silent + echo -e "$POD_REPO_SECRET" | pod trunk register $POD_REPO 'rotimi.joshua@flutterwavego.com' --name='Rotimi Joshua' --silent pod trunk push FlutterwaveSDK.podspec --allow-warnings env: From d7de9a7b2c433594bbcb372bd300b4a12828d139 Mon Sep 17 00:00:00 2001 From: Cornelius Ashley Date: Mon, 19 May 2025 17:01:52 +0100 Subject: [PATCH 4/4] Add security scan job to deployment workflow --- .github/workflows/ci-cd.yml | 5 ----- .github/workflows/security-scan.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/security-scan.yml diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index b52a80e..1fa1575 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -32,11 +32,6 @@ jobs: - name: Run Coverage Scan run: slather coverage -s --scheme FlutterwaveSDK_Example FlutterwaveSDK.xcodeproj - - name: Upload Coverage Report - uses: codecov/codecov-action@v2 - with: - token: ${{ secrets.CODECOV_TOKEN }} - - name: Update Podspec Version run: | # Update the version in your podspec diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml new file mode 100644 index 0000000..e158b9a --- /dev/null +++ b/.github/workflows/security-scan.yml @@ -0,0 +1,29 @@ +name: Security scan on all changes (Commits/PRs) + +on: + push: + branches: ['main', 'master', 'pilot', 'dev'] + pull_request: + types: + - opened + +jobs: + code-check: + runs-on: ubuntu-latest + env: + OS: ubuntu-latest + PYTHON: '3.7' + steps: + - name: checkout code + uses: actions/checkout@v2 + + + - name: Checkmarx One ClI Action + uses: checkmarx/ast-github-action@main + with: + project_name: Python-v2 + cx_tenant: Flutterwave + base_uri: https://eu.ast.checkmarx.net/ + cx_client_id: ${{ secrets.CX_CLIENT_ID }} + cx_client_secret: ${{ secrets.CX_CLIENT_SECRET }} + additional_params: --scan-types sast,iac-security,api-security,sca,container-security \ No newline at end of file