Skip to content

Commit

Permalink
Merge pull request #289 from CleverTap/develop
Browse files Browse the repository at this point in the history
Release v4.5.1
  • Loading branch information
root-ansh-ct authored Jul 12, 2022
2 parents 465c6ec + 7780a79 commit a4ee0ab
Show file tree
Hide file tree
Showing 44 changed files with 602 additions and 225 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,4 @@ runs:
clevertap-hms/build/outputs/aar
clevertap-xps/build/outputs/aar
clevertap-geofence/build/outputs/aar
clevertap-pushTemplates/build/outputs/aar
# - name: Set Output
# if: always()
# shell: bash
# run: echo "slack_msg=build code--🔜" >> $GITHUB_ENV
clevertap-pushtemplates/build/outputs/aar
19 changes: 19 additions & 0 deletions .github/mini_flows/build_code_release/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
runs:
using: "composite"
steps:

- name: Generate AAR files
shell: bash
run: ./gradlew :clevertap-core:assembleRelease :clevertap-geofence:assembleRelease :clevertap-hms:assembleRelease :clevertap-pushTemplates:assembleRelease :clevertap-xps:assembleRelease

- name: Upload AAR and apk files
if: always()
uses: actions/upload-artifact@v2
with:
name: aars_and_apks.zip
path: |
clevertap-core/build/outputs/aar
clevertap-hms/build/outputs/aar
clevertap-xps/build/outputs/aar
clevertap-geofence/build/outputs/aar
clevertap-pushtemplates/build/outputs/aar
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ runs:
clevertap-hms/build/reports/checkstyle
clevertap-xps/build/reports/checkstyle
clevertap-geofence/build/reports/checkstyle
clevertap-pushTemplates/build/reports/checkstyle
clevertap-pushtemplates/build/reports/checkstyle
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ runs:
clevertap-hms/build/reports/detekt
clevertap-xps/build/reports/detekt
clevertap-geofence/build/reports/detekt
clevertap-pushTemplates/build/reports/detekt
clevertap-pushtemplates/build/reports/detekt
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ runs:
clevertap-hms/build/reports/lint-results.html
clevertap-xps/build/reports/lint-results.html
clevertap-geofence/build/reports/lint-results.html
clevertap-pushTemplates/build/reports/lint-results.html
clevertap-pushtemplates/build/reports/lint-results.html
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ runs:
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
# cache: gradle
File renamed without changes.
32 changes: 32 additions & 0 deletions .github/mini_flows/test_and_coverage_debug/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
runs:
using: "composite"
steps:

- name: Run Unit Tests And Code Coverage (DEBUG)
shell: bash
run: ./gradlew :clevertap-core:jacocoTestReportDebug -Pcoverage='true' :clevertap-geofence:jacocoTestReportDebug -Pcoverage='true' :clevertap-hms:jacocoTestReportDebug -Pcoverage='true' :clevertap-pushTemplates:jacocoTestReportDebug -Pcoverage='true' :clevertap-xps:jacocoTestReportDebug -Pcoverage='true'

- name: Upload Unit tests
if: always()
uses: actions/upload-artifact@v2
with:
name: code-coverage-results
path: |
clevertap-core/build/reports/tests
clevertap-core/build/reports/jacoco
clevertap-hms/build/reports/tests
clevertap-hms/build/reports/jacoco
clevertap-xps/build/reports/tests
clevertap-xps/build/reports/jacoco
clevertap-geofence/build/reports/tests
clevertap-geofence/build/reports/jacoco
clevertap-pushtemplates/build/reports/tests
clevertap-pushtemplates/build/reports/jacoco
#todo : set success/failure as output and use slack action to send message . setting success failure: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-composite-actions
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@ runs:
using: "composite"
steps:

- name: Run Unit Tests And Code Coverage (DEBUG)
shell: bash
run: ./gradlew :clevertap-core:jacocoTestReportDebug :clevertap-geofence:jacocoTestReportDebug :clevertap-hms:jacocoTestReportDebug :clevertap-pushTemplates:jacocoTestReportDebug :clevertap-xps:jacocoTestReportDebug

- name: Run Unit Tests And Code Coverage (RELEASE)
shell: bash
run: ./gradlew :clevertap-core:jacocoTestReportRelease :clevertap-geofence:jacocoTestReportRelease :clevertap-hms:jacocoTestReportRelease :clevertap-pushTemplates:jacocoTestReportRelease :clevertap-xps:jacocoTestReportRelease
run: ./gradlew :clevertap-core:jacocoTestReportRelease -Pcoverage='true' :clevertap-geofence:jacocoTestReportRelease -Pcoverage='true' :clevertap-hms:jacocoTestReportRelease -Pcoverage='true' :clevertap-pushTemplates:jacocoTestReportRelease -Pcoverage='true' :clevertap-xps:jacocoTestReportRelease -Pcoverage='true'

- name: Upload Unit tests
if: always()
uses: actions/upload-artifact@v2
with:
name: unit-tests-results.zip
name: code-coverage-results
path: |
clevertap-core/build/reports/tests
clevertap-core/build/reports/jacoco
Expand All @@ -28,8 +24,8 @@ runs:
clevertap-geofence/build/reports/tests
clevertap-geofence/build/reports/jacoco
clevertap-pushTemplates/build/reports/tests
clevertap-pushTemplates/build/reports/jacoco
clevertap-pushtemplates/build/reports/tests
clevertap-pushtemplates/build/reports/jacoco
Expand Down
31 changes: 31 additions & 0 deletions .github/mini_flows/test_debug/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
runs:
using: "composite"
steps:

- name: Run Unit Tests And Code Coverage (DEBUG)
shell: bash
run: ./gradlew :clevertap-core:testDebugUnitTest :clevertap-geofence:testDebugUnitTest :clevertap-hms:testDebugUnitTest :clevertap-pushTemplates:testDebugUnitTest :clevertap-xps:testDebugUnitTest

- name: Run Unit Tests And Code Coverage (RELEASE)
shell: bash
run: ./gradlew :clevertap-core:testReleaseUnitTest :clevertap-geofence:testReleaseUnitTest :clevertap-hms:testReleaseUnitTest :clevertap-pushTemplates:testReleaseUnitTest :clevertap-xps:testReleaseUnitTest

- name: Upload Unit tests
if: always()
uses: actions/upload-artifact@v2
with:
name: unit-tests-results
path: |
clevertap-core/build/reports/tests
clevertap-hms/build/reports/tests
clevertap-xps/build/reports/tests
clevertap-geofence/build/reports/tests
clevertap-pushtemplates/build/reports/tests
#todo : set success/failure as output and use slack action to send message . setting success failure: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-composite-actions
31 changes: 31 additions & 0 deletions .github/mini_flows/test_release/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
runs:
using: "composite"
steps:

- name: Run Unit Tests And Code Coverage (DEBUG)
shell: bash
run: ./gradlew :clevertap-core:testDebugUnitTest :clevertap-geofence:testDebugUnitTest :clevertap-hms:testDebugUnitTest :clevertap-pushTemplates:testDebugUnitTest :clevertap-xps:testDebugUnitTest

- name: Run Unit Tests And Code Coverage (RELEASE)
shell: bash
run: ./gradlew :clevertap-core:testReleaseUnitTest :clevertap-geofence:testReleaseUnitTest :clevertap-hms:testReleaseUnitTest :clevertap-pushTemplates:testReleaseUnitTest :clevertap-xps:testReleaseUnitTest

- name: Upload Unit tests
if: always()
uses: actions/upload-artifact@v2
with:
name: unit-tests-results
path: |
clevertap-core/build/reports/tests
clevertap-hms/build/reports/tests
clevertap-xps/build/reports/tests
clevertap-geofence/build/reports/tests
clevertap-pushtemplates/build/reports/tests
#todo : set success/failure as output and use slack action to send message . setting success failure: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-composite-actions
119 changes: 119 additions & 0 deletions .github/workflows/manually_validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Manually validate any branch
on:
workflow_dispatch:
inputs:
check_mandatory:
description: Check for mandatory filechanges
type: boolean
default: false
required: false

lint:
description: Check lint
type: boolean
default: true
required: false

detekt:
description: Run codecheck :detekt
type: boolean
default: true
required: false

checkstyle:
description: Run codecheck :checkstyle
type: boolean
default: true
required: false

jacoco_debug:
description: Run tests and code coverage :debug
type: boolean
default: true
required: false

jacoco_release:
description: Run tests and code coverage :release
type: boolean
default: false
required: false

test_debug:
description: Run just code tests :debug
type: boolean
default: false
required: false

test_release:
description: Run just code tests :release
type: boolean
default: false
required: false

build_debug:
description: Build AARs :debug
type: boolean
default: false
required: false

build_release:
description: Build AARs :release
type: boolean
default: false
required: false

jobs:
lint-static_checks-test-build:
if: github.head_ref == 'develop'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout the code from Repo
uses: actions/checkout@v2

- name: Mandatory File Changes
if: ${{ github.event.inputs.check_mandatory }}
uses: ./.github/mini_flows/mandatory_filechanges

- name: Setup JDK 11.
uses: ./.github/mini_flows/setup_jdk

- name: Run lint tests and Upload results
if: ${{ github.event.inputs.lint }}
uses: ./.github/mini_flows/lint

- name: Static Code Check Via detekt
if: ${{ github.event.inputs.detekt }}
uses: ./.github/mini_flows/codechecks_detekt

- name: Static Code Check Via checkstyle
if: ${{ github.event.inputs.checkstyle }}
uses: ./.github/mini_flows/codechecks_checkstyle

- name: Unit Tests and Jacoco Coverage (DEBUG)
if: ${{ github.event.inputs.jacoco_debug }}
uses: ./.github/mini_flows/test_and_coverage_debug

- name: Unit Tests and Jacoco Coverage (RELEASE)
if: ${{ github.event.inputs.jacoco_release }}
uses: ./.github/mini_flows/test_and_coverage_release

- name: Unit Tests(DEBUG)
if: ${{ github.event.inputs.test_debug }}
uses: ./.github/mini_flows/test_debug

- name: Unit Tests(RELEASE)
if: ${{ github.event.inputs.test_release }}
uses: ./.github/mini_flows/test_release


- name: Build AARs (DEBUG)
if: ${{ github.event.inputs.build_debug }}
uses: ./.github/mini_flows/build_code_debug

- name: Build AARs (RELEASE)
if: ${{ github.event.inputs.build_release }}
uses: ./.github/mini_flows/build_code_release
25 changes: 14 additions & 11 deletions .github/workflows/on_pr_from_develop_to_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,26 @@ jobs:
- name: Checkout the code from Repo
uses: actions/checkout@v2

- name: Mandatory File Changes
uses: ./.github/mini_flows/s1_mandatory_filechanges

- name: Setup JDK 11.
uses: ./.github/mini_flows/s2_setup_jdk
uses: ./.github/mini_flows/setup_jdk

- name: Mandatory File Changes
uses: ./.github/mini_flows/mandatory_filechanges

- name: Run lint tests and Upload results
uses: ./.github/mini_flows/s3_lint
uses: ./.github/mini_flows/lint

- name: Static Code Check Via detekt
uses: ./.github/mini_flows/s4_detekt
uses: ./.github/mini_flows/codechecks_detekt

- name: Static Code Check Via checkstyle
uses: ./.github/mini_flows/s5_checkstyle
uses: ./.github/mini_flows/codechecks_checkstyle

- name: Unit Tests and Jacoco Coverage (DEBUG)
uses: ./.github/mini_flows/test_and_coverage_debug

- name: Unit Tests and Jacoco Coverage (DEBUG AND RELEASE)
uses: ./.github/mini_flows/s6_test_coverage
- name: Unit Tests and Jacoco Coverage (RELEASE)
uses: ./.github/mini_flows/test_and_coverage_release

- name: Build Code
uses: ./.github/mini_flows/s7_build
- name: Build AARs (RELEASE)
uses: ./.github/mini_flows/build_code_release
20 changes: 12 additions & 8 deletions .github/workflows/on_pr_from_task_to_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,23 @@ jobs:
uses: actions/checkout@v2

- name: Setup JDK 11.
uses: ./.github/mini_flows/s2_setup_jdk
uses: ./.github/mini_flows/setup_jdk

- name: Run lint tests and Upload results
uses: ./.github/mini_flows/s3_lint
uses: ./.github/mini_flows/lint

- name: Static Code Check Via detekt
uses: ./.github/mini_flows/s4_detekt
uses: ./.github/mini_flows/codechecks_detekt

- name: Static Code Check Via checkstyle
uses: ./.github/mini_flows/s5_checkstyle
uses: ./.github/mini_flows/codechecks_checkstyle

- name: Unit Tests and Jacoco Coverage (DEBUG AND RELEASE)
uses: ./.github/mini_flows/s6_test_coverage
- name: Unit Tests and Jacoco Coverage (DEBUG)
uses: ./.github/mini_flows/test_and_coverage_debug

- name: Unit Tests and Jacoco Coverage (RELEASE)
uses: ./.github/mini_flows/test_and_coverage_release

- name: Build AARs (RELEASE)
uses: ./.github/mini_flows/build_code_release

- name: Build Code
uses: ./.github/mini_flows/s7_build
Loading

0 comments on commit a4ee0ab

Please sign in to comment.