Skip to content

Commit bc2ddcb

Browse files
Merge pull request Flutterwave#17 from Flutterwave/dev
Add security scan job to ci-cd workflow
2 parents 518771d + d7de9a7 commit bc2ddcb

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed

.github/workflows/ci-cd.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: FlutterwaveSDK CI/CD Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
8+
jobs:
9+
build_and_publish:
10+
name: Build, Test, and Publish
11+
runs-on: macos-latest
12+
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v2
16+
17+
- name: Set up CocoaPods
18+
run: |
19+
gem install cocoapods
20+
pod install
21+
22+
- name: Build Framework
23+
run: |
24+
xcodebuild clean build -workspace FlutterwaveSDK.xcworkspace -scheme FlutterwaveSDK_Example -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 13"
25+
26+
- name: Install Dependencies
27+
run: pod install
28+
29+
- name: Run Unit Tests
30+
run: xcodebuild test -workspace FlutterwaveSDK.xcworkspace -scheme FlutterwaveSDK_Example -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 13"
31+
32+
- name: Run Coverage Scan
33+
run: slather coverage -s --scheme FlutterwaveSDK_Example FlutterwaveSDK.xcodeproj
34+
35+
- name: Update Podspec Version
36+
run: |
37+
# Update the version in your podspec
38+
sed -i '' "s/s.version *= *'[^']*'/s.version = '$(git describe --tags --abbrev=0 | sed 's/v//')'/g" FlutterwaveSDK.podspec
39+
40+
- name: Publish to CocoaPods
41+
run: |
42+
# Authenticate with CocoaPods repo using environment variables
43+
echo -e "$POD_REPO_SECRET" | pod trunk register $POD_REPO 'rotimi.joshua@flutterwavego.com' --name='Rotimi Joshua' --silent
44+
pod trunk push FlutterwaveSDK.podspec --allow-warnings
45+
46+
env:
47+
POD_REPO: 'https://github.com/CocoaPods/Specs.git'
48+
POD_REPO_SECRET: ${{ secrets.COCOAPODS_REPO_SECRET }}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Security scan on all changes (Commits/PRs)
2+
3+
on:
4+
push:
5+
branches: ['main', 'master', 'pilot', 'dev']
6+
pull_request:
7+
types:
8+
- opened
9+
10+
jobs:
11+
code-check:
12+
runs-on: ubuntu-latest
13+
env:
14+
OS: ubuntu-latest
15+
PYTHON: '3.7'
16+
steps:
17+
- name: checkout code
18+
uses: actions/checkout@v2
19+
20+
21+
- name: Checkmarx One ClI Action
22+
uses: checkmarx/ast-github-action@main
23+
with:
24+
project_name: Python-v2
25+
cx_tenant: Flutterwave
26+
base_uri: https://eu.ast.checkmarx.net/
27+
cx_client_id: ${{ secrets.CX_CLIENT_ID }}
28+
cx_client_secret: ${{ secrets.CX_CLIENT_SECRET }}
29+
additional_params: --scan-types sast,iac-security,api-security,sca,container-security

0 commit comments

Comments
 (0)