Skip to content

Commit

Permalink
Merge pull request #80 from adobe/staging
Browse files Browse the repository at this point in the history
staging -> main for v3.0.0 release
  • Loading branch information
emdobrin authored Apr 3, 2024
2 parents 6b306c9 + 8b1f837 commit eb7a718
Show file tree
Hide file tree
Showing 109 changed files with 1,345 additions and 813 deletions.
233 changes: 162 additions & 71 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,98 +1,189 @@
version: 2.1
#
# Copyright 2023 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/[email protected]
# Use the circleci android orb version that supports OpenJDK17 required by AGP 8.2+
android: circleci/[email protected]
codecov: codecov/[email protected]

parameters:
gradle-cache-prefix:
type: string
default: v1
build-cache-prefix:
type: string
default: v1
build-path:
type: string
default: "code/edgemedia/build"

# Workflows orchestrate a set of jobs to be run;
workflows:
version: 2
build-test-deploy:
jobs:
- 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: 2022.01.1
name: android/android-docker
resource-class: medium
tag: 2024.01.1

steps:
- checkout

- android/restore-gradle-cache:
cache-prefix: << pipeline.parameters.gradle-cache-prefix >>

- android/restore-build-cache:
cache-prefix: << pipeline.parameters.build-cache-prefix >>

- run:
name: Check format
name: Check Format
command: make checkformat

- run:
name: Check style
name: Check Style
command: make checkstyle

- android/save-gradle-cache:
cache-prefix: << pipeline.parameters.gradle-cache-prefix >>

- android/save-build-cache:
cache-prefix: << pipeline.parameters.build-cache-prefix >>

- store_artifacts:
path: << pipeline.parameters.build-path >>/reports

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

steps:
- checkout

- android/restore-gradle-cache:
cache-prefix: << pipeline.parameters.gradle-cache-prefix >>

- android/restore-build-cache:
cache-prefix: << pipeline.parameters.build-cache-prefix >>

- run:
name: Assemble phone release
command: make assemble-phone-release

- run:
name: JavaDoc
name: Javadoc
command: make javadoc

- run:
name: Download Codecov Uploader
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
- store_artifacts:
path: << pipeline.parameters.build-path >>/docs/javadoc

- run:
name: Run unit tests
command: make unit-test-coverage
name: Assemble Phone
command: make assemble-phone

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

- android/save-gradle-cache:
cache-prefix: << pipeline.parameters.gradle-cache-prefix >>

- android/save-build-cache:
cache-prefix: << pipeline.parameters.build-cache-prefix >>

- store_artifacts:
path: code/edgemedia/build/reports/tests
path: << pipeline.parameters.build-path >>/reports/tests

- store_test_results:
path: code/edgemedia/build/test-results/testPhoneDebugUnitTest
path: << pipeline.parameters.build-path >>/test-results/testPhoneDebugUnitTest

- run:
name: Upload unit test coverage
command: |
bash ./codecov -v -X s3 -c -D "./code/edgemedia/build/reports/coverage/test/phone/debug" -F unit-tests
- codecov/upload:
file: << pipeline.parameters.build-path >>/reports/coverage/test/phone/debug/report.xml
flags: unit-tests

functional-test:
executor:
name: android/android-machine
resource-class: large
tag: 2022.01.1

steps:
- checkout

- android/start-emulator-and-run-tests:
system-image: system-images;android-29;default;x86
post-emulator-launch-assemble-command: make assemble-phone
test-command: make functional-test-coverage

- store_artifacts:
path: code/edgemedia/build/reports/androidTests

- store_test_results:
path: code/edgemedia/build/outputs/androidTest-results

- run:
name: Download Codecov Uploader
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
- run:
name: Upload coverage report
command: |
bash ./codecov -v -X s3 -c -D "./code/edgemedia/build/reports/coverage/androidTest/phone/debug" -F functional-tests
executor:
name: android/android-machine
resource-class: medium
tag: 2024.01.1

workflows:
version: 2
aepsdk-edgemedia-ci:
jobs:
- build-and-unit-test
- functional-test
steps:
- checkout

- android/restore-build-cache:
cache-prefix: << pipeline.parameters.build-cache-prefix >>

- 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 assemble-phone
# The test command
test-command: make functional-test-coverage
restore-gradle-cache-prefix: << pipeline.parameters.gradle-cache-prefix >>

- android/save-build-cache:
cache-prefix: << pipeline.parameters.build-cache-prefix >>

- codecov/upload:
file: << pipeline.parameters.build-path >>/reports/coverage/androidTest/phone/debug/connected/report.xml
flags: functional-tests

- store_artifacts:
path: << pipeline.parameters.build-path >>/reports/androidTests

- store_test_results:
path: << pipeline.parameters.build-path >>/outputs/androidTest-results

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

steps:
- checkout

- android/restore-gradle-cache:
cache-prefix: << pipeline.parameters.gradle-cache-prefix >>

- android/restore-build-cache:
cache-prefix: << pipeline.parameters.build-cache-prefix >>

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

- android/save-gradle-cache:
cache-prefix: << pipeline.parameters.gradle-cache-prefix >>
- android/save-build-cache:
cache-prefix: << pipeline.parameters.build-cache-prefix >>
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
#
# Copyright 2023 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]
Expand Down
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
#
# Copyright 2023 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]
Expand Down
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/project_epic.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
#
# Copyright 2023 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: Project epic
description: Create an internal epic that represents the top level parent of multiple tasks.
labels: [epic]
Expand Down
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/project_task.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
#
# Copyright 2023 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: Project task
description: Create an internal task that can be completed as a standalone code change or is part of an epic.
labels: [task]
Expand Down
16 changes: 16 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# 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.
#

template: |
## What’s Changed
$CHANGES
Loading

0 comments on commit eb7a718

Please sign in to comment.