Skip to content
New issue

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

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

Already on GitHub? # to your account

Merge to Main for 4.1.0 release #377

Merged
merged 15 commits into from
Jul 21, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 78 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ orbs:
codecov: codecov/codecov@3.2.5
macos: circleci/macos@2

# Workflows orchestrate a set of jobs to be run;
# Workflows orchestrate a set of jobs to be run
workflows:
build-test:
jobs:
Expand All @@ -18,9 +18,23 @@ workflows:
- test-tvos:
requires:
- validate-code
# The following jobs are conditional on branch name
- test-ios-integration:
requires:
- validate-code
filters:
branches:
only:
- main
- staging
- build_xcframework_and_app:
requires:
- validate-code
filters:
branches:
only:
- main
- staging

commands:
install_dependencies:
Expand Down Expand Up @@ -79,6 +93,15 @@ commands:
version: "16.1"
device: "Apple TV"

install_rosetta_for_m1:
steps:
- run:
name: Install Rosetta for M1
command: |
if [ "${CIRCLE_JOB}" == "test-ios" ] || [ "${CIRCLE_JOB}" == "test-tvos" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this not needed for integration tests?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the coverage of integration tests overlaps with functional tests; do we want to upload the integration test coverage as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the integration tests are passing using the default medium resource class. My guess is since they use actual network calls the sequence of events execute more slowly and they don't experience the timeout issues in the functional tests. As the tests are passing, and running on an x86 chipset, there's no need to install Rosetta.

softwareupdate --install-rosetta --agree-to-license
fi

jobs:
validate-code:
macos:
Expand All @@ -96,65 +119,100 @@ jobs:
test-ios:
macos:
xcode: 14.1.0 # Specify the Xcode version to use
resource_class: macos.m1.large.gen1 # Use large resource for iOS tests

steps:
- install_rosetta_for_m1 # needed for CodeCov uploader

- checkout

- install_dependencies

- prestart_ios_simulator

- run:
name: Run iOS Tests
command: make test-ios
name: Run iOS Unit Tests
command: make unit-test-ios

# Code coverage upload using Codecov
# See options explanation here: https://docs.codecov.com/docs/codecov-uploader
- codecov/upload:
flags: ios-tests
upload_name: Coverage Report for iOS Tests
xtra_args: -c -v --xc --xp iosresults.xcresult
flags: ios-unit-tests
upload_name: Coverage report for iOS unit tests
xtra_args: -c -v --xc --xp build/reports/iosUnitResults.xcresult

- run:
name: Run iOS Functional Tests
command: make functional-test-ios
when: always # run even if unit tests fail

- codecov/upload:
flags: ios-functional-tests
upload_name: Coverage report for iOS functional tests
xtra_args: -c -v --xc --xp build/reports/iosFunctionalResults.xcresult

test-ios-integration:
macos:
xcode: 14.1.0 # Specify the Xcode version to use

steps:
- checkout

- install_dependencies

- prestart_ios_simulator

- run:
name: Run iOS integration tests
command: make test-integration-upstream

test-tvos:
macos:
xcode: 14.1.0 # Specify the Xcode version to use
resource_class: macos.m1.large.gen1 # Use large resource for tvOS tests

steps:
- install_rosetta_for_m1 # needed for CodeCov uploader

- checkout

- install_dependencies

- prestart_tvos_simulator

- run:
name: Run tvOS Tests
command: make test-tvos
name: Run tvOS Unit Tests
command: make unit-test-tvos

# Code coverage upload using Codecov
# See options explanation here: https://docs.codecov.com/docs/codecov-uploader
- codecov/upload:
flags: tvos-tests
upload_name: Coverage Report for tvOS Tests
xtra_args: -c -v --xc --xp tvosresults.xcresult
flags: tvos-unit-tests
upload_name: Coverage report for tvOS unit tests
xtra_args: -c -v --xc --xp build/reports/tvosUnitResults.xcresult

- run:
name: Run tvOS Functional Tests
command: make functional-test-tvos
when: always # run even if unit tests fail

- codecov/upload:
flags: tvos-functional-tests
upload_name: Coverage report for tvOS functional tests
xtra_args: -c -v --xc --xp build/reports/tvosFunctionalResults.xcresult

build_xcframework_and_app:
macos:
xcode: 14.1.0 # Specify the Xcode version to use

steps:
- checkout
# verify XCFramework archive builds
# Verify XCFramework archive builds
- run:
name: Build XCFramework
command: |
if [ "${CIRCLE_BRANCH}" == "main" ]; then
make archive
fi
command: make archive
# verify test app builds
- run:
name: Build Test App
command: |
if [ "${CIRCLE_BRANCH}" == "main" ]; then
make build-app
fi
command: make build-app

2 changes: 1 addition & 1 deletion .github/workflows/update_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
# Inputs the workflow accepts.
inputs:
version:
description: 'New version to use for the extension. Example: 1.5.2'
description: 'New version to use for the extension. Example: 1.5.2'
required: true

branch:
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/upstream-integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Action to execute upstream integration tests - Edge Network (Konductor)
name: Integration Tests

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to use when running integration tests'
required: false
default: 'main'
id:
description: 'Identifier for the run (optional)'
required: false
environment:
type: choice
description: 'Edge Network environment to test'
required: true
default: 'prod'
options:
- prod
- pre-prod
- int
edge-location-hint:
type: choice
description: 'Edge location hint to set before each test (optional)'
required: false
default: ''
options:
- '' # Interpreted in the test code as no preset location hint; any non-valid location hint string is interpreted this way
- 'or2'
- 'va6'
- 'irl1'
- 'ind1'
- 'jpn3'
- 'sgp3'
- 'aus3'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test-integration-upstream:
# The type of runner that the job will run on
runs-on: macos-latest

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

- 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@v3
with:
ref: ${{ github.event.inputs.branch }}

- name: Cache Cocoapods
uses: actions/cache@v3
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-

# Runs a single command using the runners shell
- name: Execute Edge Network integration tests
run: make test-integration-upstream EDGE_ENVIRONMENT=${{ github.event.inputs.environment }} EDGE_LOCATION_HINT=${{ github.event.inputs.edge-location-hint }}

# Potential workflow solutions on job failure
- name: On failure
if: ${{ failure() }}
run: |
echo 'Job used branch: ' ${{ github.event.inputs.branch }}. Please make sure this is the branch to run off of.
2 changes: 1 addition & 1 deletion AEPEdge.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "AEPEdge"
s.version = "4.0.0"
s.version = "4.1.0"
s.summary = "Experience Platform Edge extension for Adobe Experience Platform Mobile SDK. Written and maintained by Adobe."

s.description = <<-DESC
Expand Down
Loading