Skip to content

Commit

Permalink
Merge pull request #128 from adobe/staging
Browse files Browse the repository at this point in the history
Merge to Main for 3.0.0 release.
  • Loading branch information
kevinlind committed Apr 2, 2024
2 parents f18cd5d + 6681b12 commit 13f73dc
Show file tree
Hide file tree
Showing 80 changed files with 1,236 additions and 747 deletions.
208 changes: 141 additions & 67 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
#
# Copyright 2021 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@1.0
# Use the circleci android orb version that supports OpenJDK17 required by AGP 8.2+
android: circleci/android@2.4.0
codecov: codecov/codecov@4.0.1

parameters:
gradle-cache-prefix:
type: string
default: v1
build-cache-prefix:
type: string
default: v1
build_path:
type: string
default: "code/edgeidentity/build"

# Workflows orchestrate a set of jobs to be run;
workflows:
Expand All @@ -14,104 +39,153 @@ workflows:
- functional-test:
requires:
- validate-code

- build-test-app:
requires:
- validate-code
filters:
branches:
only:
- main
- staging

jobs:
validate-code:
working_directory: ~/code
docker:
- image: circleci/android:api-29-node
environment:
JVM_OPTS: -Xmx3200m
executor:
name: android/android-docker
resource-class: medium
tag: 2024.01.1-node

steps:
- checkout

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

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

- run:
name: Check Format
command: make checkformat

- run:
name: Check Code Format
command: make format-check
name: Lint
command: make lint

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

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

# Store Lint report
- store_artifacts:
path: << pipeline.parameters.build_path >>/reports

build-and-unit-test:
working_directory: ~/code
docker:
- image: circleci/android:api-29-node
environment:
JVM_OPTS: -Xmx3200m
executor:
name: android/android-docker
resource-class: medium
tag: 2024.01.1-node

steps:
- checkout

- run:
name: Javadoc
command: make ci-javadoc
- store_artifacts:
path: ci/javadoc/build/reports
- android/restore-gradle-cache:
cache-prefix: << pipeline.parameters.gradle-cache-prefix >>

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

- run:
name: Build
command: make ci-build
name: Javadoc
command: make javadoc

# - run:
# name: Build App
# command: make ci-build-app
- store_artifacts:
path: << pipeline.parameters.build_path >>/docs/javadoc

- run:
name: UnitTests
command: make ci-unit-test
name: Assemble Phone
command: make assemble-phone

# 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);
SHAVERSION=$(shasum -v);
echo "Using CodeCov version '$VERSION'"
echo "Using shasum '$SHAVERSION'"
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
- android/run-tests:
test-command: make unit-test-coverage

- store_artifacts:
path: ci/unit-test/build/reports
path: << pipeline.parameters.build_path >>/reports/tests

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

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

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

- codecov/upload:
file: << pipeline.parameters.build_path >>/reports/coverage/test/phone/debug/report.xml
flags: unit-tests

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

steps:
- checkout

- android/restore-build-cache:
cache-prefix: << pipeline.parameters.gradle-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 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);
SHAVERSION=$(shasum -v);
echo "Using CodeCov version '$VERSION'"
echo "Using shasum '$SHAVERSION'"
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:
cache-prefix: << pipeline.parameters.gradle-cache-prefix >>

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

- store_artifacts:
path: ci/functional-test/build/reports
path: << pipeline.parameters.build_path >>/reports/androidTests

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


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

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

steps:
- checkout

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

- android/restore-build-cache:
cache-prefix: << pipeline.parameters.gradle-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.gradle-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 13f73dc

Please sign in to comment.