Skip to content

Commit

Permalink
Merge pull request #81 from adobe/staging
Browse files Browse the repository at this point in the history
To Main : v3.0.0 release
  • Loading branch information
spoorthipujariadobe authored Apr 4, 2024
2 parents c8f3a68 + 184f602 commit 60110d4
Show file tree
Hide file tree
Showing 97 changed files with 6,781 additions and 3,892 deletions.
170 changes: 120 additions & 50 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,91 +1,161 @@
#
# Copyright 2022 Adobe. All rights reserved.
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
# OF ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
#

version: 2.1
orbs:
android: circleci/android@2.1.2
android: circleci/android@2.4.0
codecov: codecov/codecov@4.0.1

# Workflows orchestrate a set of jobs to be run;
workflows:
version: 2
build-test-deploy:
jobs:
- build-and-unit-test
- functional-test
- validate-code
- build-and-unit-test:
requires:
- validate-code
- functional-test:
requires:
- validate-code
- build-test-app:
requires:
- validate-code
filters:
branches:
only:
- main
- staging

jobs:
build-and-unit-test:
validate-code:
executor:
name: android/android-machine
resource-class: large
tag: 2021.10.1
working_directory: ~/code
name: android/android-docker
resource-class: medium
tag: 2024.01.1

steps:
- checkout

- android/restore-gradle-cache

- android/restore-build-cache

- run:
name: Checkstyle
command: make checkstyle
name: Check Format
command: make checkformat

- run:
name: Javadoc
command: make ci-javadoc
name: Check Style
command: make checkstyle

- android/save-gradle-cache

- android/save-build-cache

- store_artifacts:
path: ci/javadoc/build/reports
path: code/optimize/build/reports
build-and-unit-test:
executor:
name: android/android-docker
resource-class: medium
tag: 2024.01.1

steps:
- checkout

- run:
name: Build
command: make ci-build
- android/restore-gradle-cache

- android/restore-build-cache

- run:
name: UnitTests
command: make ci-unit-test
name: Javadoc
command: make javadoc

- store_artifacts:
path: code/optimize/build/docs/javadoc

# code coverage
- run:
name: Upload Code Coverage Report
command: |
curl -s https://codecov.io/bash > codecov;
VERSION=$(grep 'VERSION=\"[0-9\.]*\"' codecov | cut -d'"' -f2);
for i in 1 256 512
do
shasum -a $i -c --ignore-missing <(curl -s "https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM") ||
shasum -a $i -c <(curl -s "https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM" | grep -w "codecov")
done
bash ./codecov -v -X s3 -c -D "./ci/unit-test/build/reports" -F unit-tests
name: Assemble Phone
command: make assemble-phone

- android/run-tests:
test-command: make unit-test-coverage

- store_artifacts:
path: ci/unit-test/build/reports
path: code/optimize/build/reports/tests

- store_test_results:
path: ci/unit-test/build/test-results
path: code/optimize/build/test-results/testPhoneDebugUnitTest

- android/save-gradle-cache

- android/save-build-cache

- codecov/upload:
file: code/optimize/build/reports/coverage/test/phone/debug/report.xml
flags: unit-tests
functional-test:
executor:
executor:
name: android/android-machine
resource-class: large
tag: 2021.10.1
tag: 2024.01.1

steps:
- checkout

- android/restore-build-cache

- run:
name: List available emulator images
command: sdkmanager --list

- android/start-emulator-and-run-tests:
# It should match the name seen in the "sdkmanager --list" output
system-image: system-images;android-29;default;x86
# The command to be run, while waiting for emulator startup
post-emulator-launch-assemble-command: make ci-build
post-emulator-launch-assemble-command: make assemble-phone
# The test command
test-command: make ci-functional-test

# code coverage
- run:
name: Upload Code Coverage Report
command: |
curl -s https://codecov.io/bash > codecov;
VERSION=$(grep 'VERSION=\"[0-9\.]*\"' codecov | cut -d'"' -f2);
for i in 1 256 512
do
shasum -a $i -c --ignore-missing <(curl -s "https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM") ||
shasum -a $i -c <(curl -s "https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM" | grep -w "codecov")
done
bash ./codecov -v -X s3 -c -D "./ci/functional-test/build/reports" -F functional-tests
test-command: make functional-test-coverage

- android/save-build-cache

- codecov/upload:
file: code/optimize/build/reports/coverage/androidTest/phone/debug/connected/report.xml
flags: functional-tests

- store_artifacts:
path: ci/functional-test/build/reports
path: code/optimize/build/reports/androidTests

- store_test_results:
path: ci/functional-test/build/outputs/androidTest-results
path: code/optimize/build/outputs/androidTest-results

build-test-app:
executor:
name: android/android-docker
resource-class: medium
tag: 2024.01.1

steps:
- checkout

- android/restore-gradle-cache

- android/restore-build-cache

- run:
name: Assemble App
command: make assemble-app

- android/save-gradle-cache

- android/save-build-cache
5 changes: 5 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

make format
git diff --cached --name-only --diff-filter=d | while read filename; do git add "$filename"; done

24 changes: 8 additions & 16 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
<!--- STOP! Before you open an issue please search this repository's issues to see if it has already been reported. This helps reduce duplicate issues from being created. -->
<!--- SECURITY DISCLOSURE: If this is a security disclosure please follow the guidelines in CONTRIBUTING.md. This helps keep folks from accidentally releasing vulnerabilities before the maintainers get a chance to fix the issue. -->

### Expected Behaviour

### Actual Behaviour

### Reproduce Scenario (including but not limited to)

#### Steps to Reproduce

#### Platform and Version

#### Sample Code that illustrates the problem

#### Logs taken while reproducing problem
---
name: Blank issue
labels: task
---
## Prerequisites
<!--- Go through the items below before logging an issue -->
- [ ] I have searched in this repository's issues to see if it has already been reported.
- [ ] This is not a Security Disclosure, otherwise please follow the guidelines in [Security Policy](https://github.com/adobe/aepsdk-optimize-android/security/policy).
82 changes: 82 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#
# Copyright 2024 Adobe. All rights reserved.
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
# OF ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
#

name: Bug report
description: Create a bug report to help us improve. Use this template if you encountered an issue while integrating with or implementing the APIs of this SDK.
labels: [bug, triage-required]

body:
- type: checkboxes
attributes:
label: Prerequisites
description: Please check the following items before logging a new bug report.
options:
- label: This is not a Security Disclosure, otherwise please follow the guidelines in [Security Policy](https://github.com/adobe/aepsdk-optimize-android/security/policy).
required: true
- label: I have searched in this repository's issues to see if it has already been reported.
required: true
- label: I have updated to the latest released version of the SDK and the issue still persists.
required: true

- type: textarea
attributes:
label: Bug summary
description: Please provide a summary of the bug you are reporting.
validations:
required: true

- type: textarea
attributes:
label: Environment
description: |
Please provide the OS version, SDK version(s) used, IDE version, and any other specific settings that could help us narrow down the problem.
Example:
- **OS**: Android 13
- **SDK(s)**: optimize 2.0.0, edge 2.0.0, core 2.0.0
- **IDE**: Android Studio 2021.3.1 Patch 1
validations:
required: true

- type: textarea
attributes:
label: Steps to reproduce
description: Steps to reproduce the behavior consistently.
placeholder: |
1. ...
2. ...
3. ...
validations:
required: false

- type: textarea
attributes:
label: Current behavior
description: A concise description of what you are experiencing.
validations:
required: false

- type: textarea
attributes:
label: Expected behavior
description: A concise description of what you expected to happen.
validations:
required: false

- type: textarea
attributes:
label: Anything else?
description: |
Here you can include sample code that illustrates the problem, logs taken while reproducing the problem, or anything that can give us more context about the issue you are encountering.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
55 changes: 55 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#
# Copyright 2024 Adobe. All rights reserved.
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
# OF ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
#

name: Feature request
description: Suggest an idea for this project.
labels: [feature-request, triage-required]

body:
- type: checkboxes
attributes:
label: Prerequisites
description: Please check the following items before logging a new feature request.
options:
- label: This is not a Security Disclosure, otherwise please follow the guidelines in [Security Policy](https://github.com/adobe/aepsdk-optimize-android/security/policy).
required: true
- label: I have searched in this repository's issues to see if it has already been reported.
required: true

- type: textarea
id: description
attributes:
label: Feature request summary
description: Please provide a summary of the feature.
validations:
required: true

- type: textarea
attributes:
label: Current behavior
description: A concise description of what you are experiencing.
validations:
required: false

- type: textarea
attributes:
label: Expected behavior
description: A concise description of what you expected to happen.
validations:
required: false

- type: textarea
attributes:
label: Additional implementation details or code snippets
description: Provide additional information about this request, implementation details or code snippets.
validations:
required: false
Loading

0 comments on commit 60110d4

Please sign in to comment.