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

use iOS 13.0 and Xcode 11 on CI #1691

Merged
merged 1 commit into from
Oct 8, 2019
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
4 changes: 3 additions & 1 deletion .github/workflows/ci-master-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ on:

jobs:
cocoapods-lint:
env:
DEVELOPER_DIR: /Applications/Xcode_11.app/Contents/Developer
name: Verify that podspec lints
runs-on: macOS-10.14
runs-on: macOS-latest
steps:
- name: Checkout the Git repository
uses: actions/checkout@v1
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on: [push, pull_request]

jobs:
buildsh:
env:
DEVELOPER_DIR: /Applications/Xcode_11.app/Contents/Developer
strategy:
matrix:
mode: [tests, framework, life-without-cocoapods, carthage, examples-pt1, examples-pt2, examples-pt3, examples-pt4]
Expand All @@ -25,9 +27,9 @@ jobs:
- mode: examples-pt4
name: Build examples (examples-pt4)
name: ${{ matrix.name }}
runs-on: macOS-10.14
runs-on: macOS-latest
steps:
- name: Checkout the Git repository
uses: actions/checkout@v1
- name: Run build script
run: ./build.sh ${{ matrix.mode }}
run: ./build.sh ${{ matrix.mode }}
4 changes: 3 additions & 1 deletion .github/workflows/danger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ on: [pull_request]

jobs:
buildsh:
env:
DEVELOPER_DIR: /Applications/Xcode_11.app/Contents/Developer
strategy:
matrix:
mode: [danger]
include:
- mode: danger
name: Run Danger
name: ${{ matrix.name }}
runs-on: macOS-10.14
runs-on: macOS-latest
steps:
- name: Checkout the Git repository
uses: actions/checkout@v1
Expand Down
6 changes: 6 additions & 0 deletions Tests/ASDisplayNodeAppearanceTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ - (void)checkAppearanceMethodsCalledWithRootNodeInWindowLayerBacked:(BOOL)isLaye
{
// ASDisplayNode visibility does not change if modifying a hierarchy that is not in a window. So create one and add the superview to it.
UIWindow *window = [[UIWindow alloc] initWithFrame:CGRectZero];
[window makeKeyAndVisible];

DeclareNodeNamed(n);
DeclareViewNamed(superview);
Expand Down Expand Up @@ -154,6 +155,7 @@ - (void)checkManualAppearanceViewLoaded:(BOOL)isViewLoaded layerBacked:(BOOL)isL
{
// ASDisplayNode visibility does not change if modifying a hierarchy that is not in a window. So create one and add the superview to it.
UIWindow *window = [[UIWindow alloc] initWithFrame:CGRectZero];
[window makeKeyAndVisible];

DeclareNodeNamed(parent);
DeclareNodeNamed(a);
Expand Down Expand Up @@ -253,6 +255,7 @@ - (void)testSynchronousIntermediaryView
layerBackedNode.layerBacked = YES;

UIWindow *window = [[UIWindow alloc] initWithFrame:CGRectZero];
[window makeKeyAndVisible];
[parentSynchronousNode addSubnode:layerBackedNode];
[parentSynchronousNode addSubnode:viewBackedNode];

Expand Down Expand Up @@ -291,6 +294,7 @@ - (void)testSynchronousIntermediaryView
- (void)checkMoveAcrossHierarchyLayerBacked:(BOOL)isLayerBacked useManualCalls:(BOOL)useManualDisable useNodeAPI:(BOOL)useNodeAPI
{
UIWindow *window = [[UIWindow alloc] initWithFrame:CGRectZero];
[window makeKeyAndVisible];

DeclareNodeNamed(parentA);
DeclareNodeNamed(parentB);
Expand Down Expand Up @@ -374,6 +378,8 @@ - (void)checkMoveAcrossHierarchyLayerBacked:(BOOL)isLayerBacked useManualCalls:(
// Make sure that we don't leave these unbalanced
XCTAssertFalse([child __visibilityNotificationsDisabled], @"Unbalanced visibility notifications calls");
XCTAssertFalse([child __selfOrParentHasVisibilityNotificationsDisabled], @"Should not have re-enabled yet");
[parentA removeFromSupernode];
[parentB removeFromSupernode];
}

- (void)testMoveAcrossHierarchyLayer
Expand Down
11 changes: 8 additions & 3 deletions Tests/ASDisplayNodeTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ - (void)checkValuesMatchDefaults:(ASDisplayNode *)node isLayerBacked:(BOOL)isLay
XCTAssertTrue(CGRectEqualToRect(CGRectZero, node.frame), @"default frame broken %@", hasLoadedView);
XCTAssertTrue(CGPointEqualToPoint(CGPointZero, node.position), @"default position broken %@", hasLoadedView);
XCTAssertEqual((CGFloat)0.0, node.zPosition, @"default zPosition broken %@", hasLoadedView);
XCTAssertEqual(1.0f, node.contentsScale, @"default contentsScale broken %@", hasLoadedView);
XCTAssertEqual(node.isNodeLoaded && !isLayerBacked ? 2.0f : 1.0f, node.contentsScale, @"default contentsScale broken %@", hasLoadedView);
XCTAssertEqual([UIScreen mainScreen].scale, node.contentsScaleForDisplay, @"default contentsScaleForDisplay broken %@", hasLoadedView);
XCTAssertTrue(CATransform3DEqualToTransform(CATransform3DIdentity, node.transform), @"default transform broken %@", hasLoadedView);
XCTAssertTrue(CATransform3DEqualToTransform(CATransform3DIdentity, node.subnodeTransform), @"default subnodeTransform broken %@", hasLoadedView);
Expand Down Expand Up @@ -2654,7 +2654,9 @@ - (void)testThatConvertPointGoesToWindowWhenPassedNil_layerBacked
ASXCTAssertEqualPoints([node convertPoint:node.bounds.origin toNode:nil], expectedOrigin);
}

- (void)testThatItIsAllowedToRetrieveDebugDescriptionIncludingVCOffMainThread
// this test fails with assertion cause some data should be accessed from the main thread
// so it doesn't really work
- (void)DISABLED_testThatItIsAllowedToRetrieveDebugDescriptionIncludingVCOffMainThread
{
ASDisplayNode *node = [[ASDisplayNode alloc] init];
UIViewController *vc = [[UIViewController alloc] init];
Expand Down Expand Up @@ -2688,7 +2690,9 @@ - (void)testThatSubnodeSafeAreaInsetsAreCalculatedCorrectly
UIWindow *window = [[UIWindow alloc] init];
window.rootViewController = viewController;
[window setHidden:NO];
[window layoutIfNeeded];

[window.rootViewController.view setNeedsLayout];
[window.rootViewController.view layoutIfNeeded];

UIEdgeInsets expectedRootNodeSafeArea = UIEdgeInsetsMake(10, 10, 10, 10);
UIEdgeInsets expectedSubnodeSafeArea = UIEdgeInsetsMake(9, 8, 7, 6);
Expand Down Expand Up @@ -2747,6 +2751,7 @@ - (void)testCornerRoundingTypeClippingRoundedCornersIsUsingASDisplayNodeCornerLa
- (void)testLayerActionForKeyIsCalled
{
UIWindow *window = [[UIWindow alloc] init];
[window makeKeyAndVisible];
ASDisplayNode *node = [[ASDisplayNode alloc] init];

id mockNode = OCMPartialMock(node);
Expand Down
2 changes: 1 addition & 1 deletion Tests/ASRunLoopQueueTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#import "ASDisplayNodeTestsHelper.h"

static NSTimeInterval const kRunLoopRunTime = 0.001; // Allow the RunLoop to run for one millisecond each time.
static NSTimeInterval const kRunLoopRunTime = 0.01; // Allow the RunLoop to run for 1/100 second each time.

@interface QueueObject : NSObject <ASCATransactionQueueObserving>
@property (nonatomic) BOOL queueObjectProcessed;
Expand Down
7 changes: 6 additions & 1 deletion Tests/ASViewControllerTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ @implementation ASViewControllerTests
- (void)testThatAutomaticSubnodeManagementScrollViewInsetsAreApplied
{
UIWindow *window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
[window makeKeyAndVisible];

ASDisplayNode *node = [[ASDisplayNode alloc] init];
node.automaticallyManagesSubnodes = YES;
ASScrollNode *scrollNode = [[ASScrollNode alloc] init];
Expand All @@ -34,13 +36,16 @@ - (void)testThatAutomaticSubnodeManagementScrollViewInsetsAreApplied
window.rootViewController = [[UINavigationController alloc] initWithRootViewController:vc];
[window makeKeyAndVisible];
[window layoutIfNeeded];

XCTAssertEqualObjects(NSStringFromCGRect(window.bounds), NSStringFromCGRect(node.frame));
XCTAssertNotEqual(scrollNode.view.contentInset.top, 0);
XCTAssertEqual(scrollNode.view.contentInset.top, 0);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

why it shouldn't be equal to zero?

}

- (void)testThatViewControllerFrameIsRightAfterCustomTransitionWithNonextendedEdges
{
UIWindow *window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
[window makeKeyAndVisible];

ASDisplayNode *node = [[ASDisplayNode alloc] init];

ASViewController *vc = [[ASViewController alloc] initWithNode:node];
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...ges_iOS_10/ASButtonNodeSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...ges_iOS_10/ASButtonNodeSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...deSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...NodeSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...ges_iOS_10/ASDisplayNodeSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...ages_iOS_10/ASDisplayNodeSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...ages_iOS_10/ASDisplayNodeSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...ages_iOS_10/ASDisplayNodeSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ..._iOS_10/ASImageNodeSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ..._10/ASStackLayoutSpecSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...10/ASStackLayoutSpecSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...OS_10/ASStackLayoutSpecSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...iOS_10/ASStackLayoutSpecSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...mages_iOS_10/ASStackLayoutSpecSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ..._10/ASTextNode2SnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...mages_iOS_10/ASTextNode2SnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...enceImages_iOS_10/ASTextNode2SnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ..._10/ASTextNode2SnapshotTests/[email protected]
Binary file modified ...nceImages_iOS_10/ASTextNodeSnapshotTests/[email protected]
Binary file modified ...nceImages_iOS_10/ASTextNodeSnapshotTests/[email protected]
Binary file modified ...s_iOS_10/ASTextNodeSnapshotTests/[email protected]
Loading