Skip to content

Commit

Permalink
Merge pull request #273 from adobe/dev-v3.2.1
Browse files Browse the repository at this point in the history
Dev v3.2.1 to staging for 3.2.1 release
  • Loading branch information
rymorale authored Oct 2, 2024
2 parents 637dadb + d774e01 commit 6735945
Show file tree
Hide file tree
Showing 41 changed files with 2,292 additions and 204 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ workflows:
- build-and-unit-test:
requires:
- validate-code
# - functional-test:
# requires:
# - validate-code
- functional-test:
requires:
- validate-code
- build-test-app:
requires:
- validate-code
Expand Down
71 changes: 57 additions & 14 deletions .github/workflows/functional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,84 @@
# governing permissions and limitations under the License.
#

# Remote action to execute e2e functional tests

name: E2E Functional Tests

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
schedule:
- cron: '0 11 * * *'
- cron: '0 23 * * *'
workflow_dispatch:
inputs:
branch:
inputs:
branch:
description: 'Branch to use when running functional tests'
required: false
default: 'feature/iam' # update this to main once feature/iam is merged to main
default: 'main'
id:
description: 'Identifier for the run'
required: false
environment:
description: 'Environment and region to test (prodVA7, prodAUS5, prodNLD2, stageVA7)'
required: true
default: 'prodVA7'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

functional-test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
api-level: [29]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:

- name: ${{ github.event.inputs.id }}
run: echo Run Identifier is ${{ inputs.id }}


- name: Job run identifier ${{ github.event.inputs.id }}
run: |
if [ -z "${{ github.event.inputs.id }}" ]; then \
echo No job run identifier was set.
else
echo 'Job run identifier is:' ${{ inputs.id }}
fi;
- name: Checkout
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch }}

# Runs a single command using the runners shell
- name: Execute functional tests
run: make functional-test

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17

- name: ${{ github.event.inputs.id || 'scheduled' }}
run: echo Run Identifier is ${{ inputs.id || 'scheduled' }}

# Update messaging build config to set the ADOBE_ENVIRONMENT value to use for testing
- name: Update environment
run: make set-environment ENV=${{ github.event.inputs.environment || 'prodVA7' }}

- name: run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: make functional-test

- name: Update Slack on failure
if: failure()
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486
with:
status: ${{ job.status }}
fields: repo,action,ref,workflow
text: |
E2E Testing for Inbound Personalization has Failed :(
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
EXTENSION-LIBRARY-FOLDER-NAME = messaging
TEST-APP-FOLDER-NAME = testapp
CURRENT_DIRECTORY := ${CURDIR}
MESSAGING_GRADLE_FILE = $(CURRENT_DIRECTORY)/code/messaging/build.gradle.kts
MESSAGING_GRADLE_TEMP_FILE = $(MESSAGING_GRADLE_FILE).backup

init:
git config core.hooksPath .githooks
Expand Down Expand Up @@ -55,4 +58,14 @@ ci-publish-staging: assemble-phone-release
(./code/gradlew -p code/$(EXTENSION-LIBRARY-FOLDER-NAME) publishReleasePublicationToSonatypeRepository)

ci-publish: assemble-phone-release
(./code/gradlew -p code/$(EXTENSION-LIBRARY-FOLDER-NAME) publishReleasePublicationToSonatypeRepository -Prelease)
(./code/gradlew -p code/$(EXTENSION-LIBRARY-FOLDER-NAME) publishReleasePublicationToSonatypeRepository -Prelease)

# usage -
# make set-environment ENV=[environment]
set-environment:
@echo "Setting E2E functional testing to run in environment '$(ENV)'"
sed -i.backup 's|prodVA7|$(ENV)|g' $(MESSAGING_GRADLE_FILE)
sed -i.backup 's|prodAUS5|$(ENV)|g' $(MESSAGING_GRADLE_FILE)
sed -i.backup 's|prodNLD2|$(ENV)|g' $(MESSAGING_GRADLE_FILE)
sed -i.backup 's|stageVA7|$(ENV)|g' $(MESSAGING_GRADLE_FILE)
rm ${MESSAGING_GRADLE_TEMP_FILE}
2 changes: 2 additions & 0 deletions code/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/
apply(plugin = "aep-license")
buildscript {
val kotlin_version by extra("2.0.20")
repositories {
gradlePluginPortal()
google()
Expand All @@ -21,5 +22,6 @@ buildscript {
dependencies {
classpath("com.github.adobe:aepsdk-commons:gp-3.0.0")
classpath("com.google.gms:google-services:4.4.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
}
}
4 changes: 2 additions & 2 deletions code/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ org.gradle.caching=true
android.useAndroidX=true

moduleName=messaging
moduleVersion=3.2.0
moduleVersion=3.2.1

#Maven artifact
mavenRepoName=AdobeMobileMessagingSdk
mavenRepoDescription=Adobe Experience Platform Messaging extension for the Adobe Experience Platform Mobile SDK
mavenUploadDryRunFlag=false

# production versions for production build
mavenCoreVersion=3.1.0
mavenCoreVersion=3.2.0
mavenLifecycleVersion=3.0.1
mavenAssuranceVersion=3.0.1
mavenEdgeVersion=3.0.0
Expand Down
6 changes: 6 additions & 0 deletions code/messaging/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ aepLibrary {
defaultConfig {
buildConfigField("java.util.concurrent.atomic.AtomicBoolean", "IS_E2E_TEST", "new java.util.concurrent.atomic.AtomicBoolean(false)")
buildConfigField("java.util.concurrent.atomic.AtomicBoolean", "IS_FUNCTIONAL_TEST", "new java.util.concurrent.atomic.AtomicBoolean(false)")
buildConfigField("String", "ADOBE_ENVIRONMENT", "\"prodVA7\"")
}

sourceSets {
named("test").configure { resources.srcDir("src/test/resources") }
named("androidTest").configure { resources.srcDir("src/test/resources") }
}
}
}
Expand Down
Loading

0 comments on commit 6735945

Please sign in to comment.