Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge to Staging for v3.0.0 release #140

Merged
merged 16 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
152 changes: 63 additions & 89 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,37 @@

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

# Define pipeline parameters available to all jobs
parameters:
gradle-cache-prefix:
type: string
default: v1
build-cache-prefix:
type: string
default: v1
build-path:
type: string
default: code/edge/build

# Workflows orchestrate a set of jobs to be run;
workflows:
version: 2
build-test-deploy:
jobs:
- validate-code:
gradle-cache-prefix: v1
build-cache-prefix: v1
- validate-code

- build-and-unit-test:
gradle-cache-prefix: v1
build-cache-prefix: v1
requires:
- validate-code

- functional-test:
gradle-cache-prefix: v1
build-cache-prefix: v1
requires:
- validate-code

- integration-test:
gradle-cache-prefix: v1
build-cache-prefix: v1
requires:
- validate-code
filters:
Expand All @@ -49,120 +53,98 @@ workflows:

jobs:
validate-code:
parameters:
gradle-cache-prefix:
type: string
default: v1
build-cache-prefix:
type: string
default: v1

# List of available Android Docker images: https://circleci.com/developer/images/image/cimg/android#image-tags
executor:
name: android/android-docker
tag: 2022.09.2-node
tag: 2024.01.1-node

steps:
- checkout

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

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

- run:
name: Lint Code
command: make lint-check
name: Lint
command: make lint

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

# Store Lint report
- store_artifacts:
path: code/edge/build/reports
path: << pipeline.parameters.build-path >>/reports

build-and-unit-test:
parameters:
gradle-cache-prefix:
type: string
default: v1
build-cache-prefix:
type: string
default: v1

# List of available Android Docker images: https://circleci.com/developer/images/image/cimg/android#image-tags
executor:
name: android/android-docker
tag: 2022.09.2-node
tag: 2024.01.1-node

steps:
- checkout

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

- run:
name: Javadoc
command: make ci-javadoc
command: make javadoc
- store_artifacts:
path: ci/javadoc/build/reports
path: << pipeline.parameters.build-path >>/dokka/javadoc

- run:
name: Build
command: make ci-build
name: Assemble Phone
command: make assemble-phone

- run:
name: Build App
command: make ci-build-app
name: Assemble App
command: make assemble-app

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

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

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

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

# Code coverage upload using Codecov
# See options explanation here: https://docs.codecov.com/docs/codecov-uploader
- codecov/upload:
file: ci/unit-test/build/reports/jacoco/platformUnitTestJacocoReport/platformUnitTestJacocoReport.xml
file: << pipeline.parameters.build-path >>/reports/coverage/test/phone/debug/report.xml
flags: unit-tests

- store_artifacts:
path: ci/unit-test/build/reports

# On test failures, the step in the Makefile to copy the reports to ci/ is not run, so store test results from build folder instead.
- store_test_results:
path: code/edge/build/test-results

functional-test:
parameters:
gradle-cache-prefix:
type: string
default: v1
build-cache-prefix:
type: string
default: v1

# list of available Android machine images: https://circleci.com/developer/machine/image/android#image-tags
executor:
name: android/android-machine
resource-class: large
tag: 2022.09.1
tag: 2024.01.1
steps:
- checkout

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

- run:
name: List available emulator images
Expand All @@ -172,35 +154,27 @@ jobs:
# 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
restore-gradle-cache-prefix: << parameters.gradle-cache-prefix >>
test-command: make functional-test-coverage
restore-gradle-cache-prefix: << pipeline.parameters.gradle-cache-prefix >>

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

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

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

# Code coverage upload using Codecov
# See options explanation here: https://docs.codecov.com/docs/codecov-uploader
- codecov/upload:
file: ci/functional-test/build/reports/coverage/androidTest/phone/debug/connected/report.xml
file: << pipeline.parameters.build-path >>/reports/coverage/androidTest/phone/debug/connected/report.xml
flags: functional-tests

- store_artifacts:
path: ci/functional-test/build/reports

# On test failures, the step in the Makefile to copy the reports to ci/ is not run, so store test results from build folder instead.
- store_test_results:
path: code/edge/build/outputs/androidTest-results

integration-test:
parameters:
gradle-cache-prefix:
type: string
default: v1
build-cache-prefix:
type: string
default: v1

# list of available Android machine images: https://circleci.com/developer/machine/image/android#image-tags
executor:
Expand All @@ -211,7 +185,7 @@ jobs:
- checkout

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

- run:
name: List available emulator images
Expand All @@ -221,13 +195,13 @@ jobs:
# 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-upstream-integration-test
restore-gradle-cache-prefix: << parameters.gradle-cache-prefix >>
test-command: make upstream-integration-test
restore-gradle-cache-prefix: << pipeline.parameters.gradle-cache-prefix >>

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

# On test failures, the step in the Makefile to copy the reports to ci/ is not run, so store test results from build folder instead.
- store_test_results:
Expand Down
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 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]
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 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]
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 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: 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 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: 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