-
Notifications
You must be signed in to change notification settings - Fork 24
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
Migrate build and test workflow to GitHub Actions #509
Conversation
This supports command line args updating the device and OS to test with, and also enables CI matrix support
The Removing the version scripts is great. Seems like that was missed when adding the version update GH Action script. |
Thanks @kevinlind, that's a great point! For some additional context, I was planning on also migrating the Edge iOS repo to use the reusable workflow build and test for PR checks in aepsdk-commons: Basically, the Codecov action's Xcode plugin which handles creating test coverage looks in the default directory xcodebuild uses and this change was meant to align with that |
run-test-ios-unit: true | ||
run-test-ios-functional: true | ||
run-test-ios-integration: true | ||
run-test-tvos-unit: true | ||
run-test-tvos-functional: true | ||
run-build-xcframework-and-app: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to only run some of these tests on specific branches? For example, we run the integration tests and build the xcframework and app just on the staging and main branches to reduce the time it takes to build the dev and pr branches. Depending on how long it takes to run these jobs it may not be necessary to exclude them, however.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevinlind thanks for your help in updating the actions rules for the repo - after running the new build and test workflow which runs all of these in parallel, it looks like integration tests (3m 44s) and building the xcframework and app (3m 36s) take less time than the functional tests (9m+)
In that case, I think it should be ok to keep them in the regular checks? What do you think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will have to make changes to add branch if we cause or run into the issue of unavailability of runners. Even if we don't have the branch based rule today, it will be a good practice to have it ready in case we need it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we wait to implement that if/when we encounter the unavailability? I could split the usage of the workflow into two pieces - the branch dependent and non-dependent jobs, which should be a quick change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, then let's see how this plays out.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #509 +/- ##
==========================================
- Coverage 96.73% 95.97% -0.77%
==========================================
Files 27 28 +1
Lines 1653 1463 -190
==========================================
- Hits 1599 1404 -195
- Misses 54 59 +5 |
Rename build and test job Revert change to README
@@ -22,7 +22,7 @@ import XCTest | |||
|
|||
/// End-to-end testing for the AEPEdge public APIs | |||
class AEPEdgeFunctionalTests: TestBase, AnyCodableAsserts { | |||
private let TIMEOUT_SEC: TimeInterval = 2 | |||
private let TIMEOUT_SEC: TimeInterval = 10 | |||
private let LONGER_TIMEOUT_SEC: TimeInterval = 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have LONGER_TIMEOUT_SEC which is 10 seconds. We can move this into common constants file (FuntionalTestConstants.swift) if this applies to all the integration tests, and let's use only one time and update it to 10 sec if that makes our tests more stable.
…lows (#512) * Make EdgeEventHandles and completionHandlers interactions thread safe (#481) * Make EdgeEventHandles and completionHandlers interactions thread safe * Minor refactor * Update queue name * Update AEPTestUtils to 5.2.2 * Update GitHub Action workflows to use aepsdk-commons (#507) * Migrate release and update versions workflows to use reusable workflows (testing configuration) * Revert naming update * Update input types * Update input order * Revert testing config * Add code docs on how to update the workflow tag * Update release workflow to use env var and ternary * Temp use testing config * Test github actions style ternary * Update input descriptions and name + usages Update workflow call input variable names * Revert testing config * Add permissions to workflows * Testing new version validation process in release * Update to testing config * Test version script updates * Fix pattern type override missing * Revert back to production configs * Remove default from mandatory fields to trigger error on empty submit * Apply testing config * Update tags * Apply testing config * Remove passing workflow_tag * Remove outdated comment * Update with production tags * Update to full production config * Revert "Make EdgeEventHandles and completionHandlers interactions thread safe (#481)" (#510) This reverts commit 607f927. * Migrate build and test workflow to GitHub Actions (#509) * Remove local version related rules and scripts * Test removing resultBundlePath flag * TEST: versions-update branch compatibility with original versions usage * Apply prod config * Update Makefile test rules for configurable device and OS This supports command line args updating the device and OS to test with, and also enables CI matrix support * Replace CircleCI with GitHub Actions reusable workflow * Add license headers to workflow files * Apply prod config * Trigger change * Remove @ from Makefile rule for integration test Rename build and test job Revert change to README * Increase timeout from 2 to 5 sec * Fix double expectation for first event * Add MobileCore resetSDK to teardown * Add reset test expectations to tear down and increase timeout * Increase timeout duration to 10 sec default * Add timeout to all network request assertions * Update order of files * Rename upstream integration test job to align with naming convention style * Create integration test rule name that aligns with reusable workflow * Use codecov flag based on new default * Create new functional test constants and route functional test usage to new default * Add default timeout to network request assertions * Functional test stability (#513) * Pod lock with 1.16.2 * Apply default timeout to all network request gets --------- Co-authored-by: Arjun Bhadra <[email protected]>
Questions for reviewers
Description
This PR updates the Makfile test rules to use configurable device name and OS, and removes some local scripts that are handled by the new reusable workflows.
The configurable device name and OS also enable compatibility with GitHub Actions matrix configurations:
Example run (with matrix using both iOS and tvOS paths): https://github.com/timkimadobe/aepsdk-edge-ios/actions/runs/11695962501
Makefile
New computed properties
IOS_DESTINATION
andTVOS_DESTINATION
used in thexcodebuild test
commands, which rely on the new input values:IOS_DEVICE_NAME
- defaults to "iPhone 15"IOS_VERSION
- defaults to nothing (same behavior as before)TVOS_DEVICE_NAME
- defaults to "Apple TV"TVOS_VERSION
- defaults to nothing (same behavior as before)Breaking changes
-derivedDataPath
and-resultBundlePath
for test rules has been removed so that test coverage is placed in the default location. This is to facilitate compatibility with the Codecov action's Xcode plugin test result coverage search behavior: iOS CircleCI to GitHub Actions reusable workflow conversion aepsdk-commons#67 (comment)/Users/runner/Library/Developer/Xcode/DerivedData/AEPEdge-byotfosbfuyloqdajycdwzyadpcv/Logs/Test/Test-UnitTests-2024.11.15_13-51-24--0800.xcresult
check-version
andtest-version-update
have been removedExample usage
make unit-test-ios IOS_DEVICE_NAME="iPhone 16"
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: