TP-61357: Introducing ReactNative | Insurance - Quote page experiments (#10199)

Co-authored-by: Shivam Goyal <shivam.goyal@navi.com>
This commit is contained in:
Raaj Gopal
2024-03-27 20:36:03 +05:30
committed by GitHub
parent 19b8fe49da
commit d27044fd5f
216 changed files with 25611 additions and 72 deletions

View File

@@ -2,9 +2,9 @@ name: Android Build CI
on:
push:
branches: [ master, release-*, development ]
branches: [ master, release-* ]
pull_request:
branches: [ master, release-*, development ]
branches: [ master, release-* ]
merge_group:
concurrency:
@@ -20,7 +20,7 @@ jobs:
output: APK
build-qa-release:
if: github.event_name == 'push' && (github.ref_name == 'master' || startsWith(github.ref_name, 'release-'))
if: github.event_name == 'push' && startsWith(github.ref_name, 'release-')
uses: ./.github/workflows/generate_build.yml
with:
environment: qa
@@ -28,7 +28,7 @@ jobs:
output: APK
generate-apk-diff:
if: github.event_name == 'pull_request' && github.base_ref == 'development'
if: github.event_name == 'pull_request' && github.base_ref == 'master'
uses: ./.github/workflows/generate_apk_diff.yml
needs: build-qa-debug
secrets:
@@ -36,7 +36,7 @@ jobs:
AWS_SECRET_KEY_GITHUB_CACHE: ${{ secrets.AWS_SECRET_KEY_GITHUB_CACHE }}
upload-apk-to-s3:
if: github.event_name == 'push' && github.ref_name == 'development'
if: github.event_name == 'push' && github.ref_name == 'master'
uses: ./.github/workflows/upload_file.yml
needs: build-qa-debug
secrets:

View File

@@ -2,7 +2,7 @@ name: Android Checkstyle CI
on:
pull_request:
branches: [ master, release-*, development ]
branches: [ master, release-* ]
merge_group:
concurrency:
@@ -18,8 +18,12 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Fetch origin/development
run: git fetch origin development
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18.18.0
- name: Install Node Modules
run: npm install
- name: Set up JDK 17
uses: actions/setup-java@v4
with:

View File

@@ -74,6 +74,12 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18.18.0
- name: Install Node Modules
run: npm install
- name: Override Version Code
if: github.event_name == 'workflow_dispatch' && inputs.version_code != ''
run: sed -i 's/def VERSION_CODE = [0-9].*/def VERSION_CODE = ${{ inputs.version_code }}/g' app/build.gradle

View File

@@ -25,6 +25,12 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18.18.0
- name: Install Node Modules
run: npm install
- name: Log Build Metadata
run: |
echo "Commit SHA: ${{ github.sha }}"

View File

@@ -3,7 +3,7 @@ name: Security API Diff Monitor
on:
pull_request:
branches:
- development
- master
types: [ opened, edited, synchronize, reopened ]
merge_group:

View File

@@ -6,7 +6,6 @@ on:
branches:
- master
- main
- development
- release-*
schedule:
- cron: '30 4 * * MON'

View File

@@ -23,7 +23,7 @@ jobs:
run: |
echo "ORIGINAL_PR_NUMBER=$(echo "${{ github.event.pull_request.body }}" | grep -o "https://github.com/${{ github.repository }}/pull/[0-9]*" | grep -o "[0-9]*")" >> $GITHUB_ENV
echo "CURRENT_PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
- name: Verification Step 1 - Link to development PR is added in release PR Body
- name: Verification Step 1 - Link to master PR is added in release PR Body
if: always()
run: |
ORIGINAL_PR_URL="https://github.com/${{ github.repository }}/pull/$ORIGINAL_PR_NUMBER"
@@ -33,10 +33,10 @@ jobs:
echo "Pull request body: ${{ github.event.pull_request.body }}"
if [[ "${{ github.event.pull_request.body }}" != *"$ORIGINAL_PR_URL"* ]]; then
echo "Link to original PR raised against development branch not found in current PR body"
echo "Link to original PR raised against master branch not found in current PR body"
exit 1
fi
- name: Verification Step 2 - release PR Title matches development PR Title
- name: Verification Step 2 - release PR Title matches master PR Title
if: always()
run: |
ORIGINAL_PR_TITLE=$(curl -L -H "Authorization: Bearer ${{ secrets.GH_PAT_RO }}" "https://api.github.com/repos/${{ github.repository }}/pulls/$ORIGINAL_PR_NUMBER" | jq -r .title)
@@ -46,53 +46,53 @@ jobs:
echo "Current PR title extracted: ${{ github.event.pull_request.title }}"
if [[ "${{ github.event.pull_request.title }}" != "$ORIGINAL_PR_TITLE" ]]; then
echo "Current PR title does not match original PR title raised against development branch"
echo "Current PR title does not match original PR title raised against master branch"
exit 1
fi
- name: Verification Step 3 - development PR is Merged
- name: Verification Step 3 - master PR is Merged
if: always()
run: |
ORIGINAL_PR_IS_MERGED=$(curl -L -H "Authorization: Bearer ${{ secrets.GH_PAT_RO }}" "https://api.github.com/repos/${{ github.repository }}/pulls/$ORIGINAL_PR_NUMBER" | jq -r '.merged')
BASE_REF_BRANCH=$(curl -L -H "Authorization: Bearer ${{ secrets.GH_PAT_RO }}" "https://api.github.com/repos/${{ github.repository }}/pulls/$ORIGINAL_PR_NUMBER" | jq -r '.base.ref')
if [[ "$ORIGINAL_PR_IS_MERGED" == "true" && "$BASE_REF_BRANCH" == "development" ]]; then
echo "Original PR is merged into development branch"
if [[ "$ORIGINAL_PR_IS_MERGED" == "true" && "$BASE_REF_BRANCH" == "master" ]]; then
echo "Original PR is merged into master branch"
else
echo "Original PR number: $ORIGINAL_PR_NUMBER"
echo "Original PR merge status: $ORIGINAL_PR_IS_MERGED"
echo "Base branch: $BASE_REF_BRANCH"
echo "Status: Fail. Original PR is not merged in development branch."
echo "Status: Fail. Original PR is not merged in master branch."
exit 1
fi
- name: Verification Step 4 - release PR is exactly same as development PR
- name: Verification Step 4 - release PR is exactly same as master PR
if: always()
run: |
# Get the JSON response for the first pull request
response_pr_development=$(curl -L -H "Authorization: Bearer ${{ secrets.GH_PAT_RO }}" "https://api.github.com/repos/${{ github.repository }}/pulls/$ORIGINAL_PR_NUMBER/files")
files_pr_development=$(echo "$response_pr_development" | jq -r '.[].filename')
response_pr_master=$(curl -L -H "Authorization: Bearer ${{ secrets.GH_PAT_RO }}" "https://api.github.com/repos/${{ github.repository }}/pulls/$ORIGINAL_PR_NUMBER/files")
files_pr_master=$(echo "$response_pr_master" | jq -r '.[].filename')
# Get the JSON response for the second pull request
response_pr_release=$(curl -L -H "Authorization: Bearer ${{ secrets.GH_PAT_RO }}" "https://api.github.com/repos/${{ github.repository }}/pulls/$CURRENT_PR_NUMBER/files")
files_pr_release=$(echo "$response_pr_release" | jq -r '.[].filename')
# Compare the lists of changed files
if [ "$files_pr_development" != "$files_pr_release" ]; then
if [ "$files_pr_master" != "$files_pr_release" ]; then
echo "Pull requests have different sets of changed files."
exit 1
fi
# Loop through each file and compare added and deleted lines
for file in $details_pr_development; do
details_pr_development=($(echo "$response_pr_development" | jq -r --arg file "$file" '.[] | select(.filename == $file) | .additions, .deletions'))
for file in $details_pr_master; do
details_pr_master=($(echo "$response_pr_master" | jq -r --arg file "$file" '.[] | select(.filename == $file) | .additions, .deletions'))
details_pr_release=($(echo "$response_pr_release" | jq -r --arg file "$file" '.[] | select(.filename == $file) | .additions, .deletions'))
added_lines_pr_development="${details_pr_development[0]}"
deleted_lines_pr_development="${details_pr_development[1]}"
added_lines_pr_master="${details_pr_master[0]}"
deleted_lines_pr_master="${details_pr_master[1]}"
added_lines_pr_release="${details_pr_release[0]}"
deleted_lines_pr_release="${details_pr_release[1]}"
if [ "$added_lines_pr_development" != "$added_lines_pr_release" ] || [ "$deleted_lines_pr_development" != "$deleted_lines_pr_release" ]; then
if [ "$added_lines_pr_master" != "$added_lines_pr_release" ] || [ "$deleted_lines_pr_master" != "$deleted_lines_pr_release" ]; then
echo "File $file has different added or deleted lines in the two pull requests."
exit 1
fi