cashapp / AccessibilitySnapshot

Easy regression testing for iOS accessibility
Apache License 2.0
541 stars 69 forks source link

Move iOS 12 CI build to GitHub Actions #43

Closed NickEntin closed 3 years ago

NickEntin commented 3 years ago

Travis CI no longer has free macOS builds, so it's time to migrate away. This moves our iOS 12 snapshot CI build over to GitHub Actions.

NickEntin commented 3 years ago

Had to pin SnapshotTesting to 1.7 in the sample app because 1.8 dropped support for Xcode 10. Really wish that had been considered a breaking change. 😞 Unfortunately GitHub Actions doesn't have an easy way to run iOS 12 tests on Xcode 11, so we need to keep up Xcode 10 support.

NickEntin commented 3 years ago

I already marked the Travis CI build as a non-required check since it isn't working properly. Once this is merged I'll mark the new iOS 12 build as required.

NickEntin commented 3 years ago

We've added the SwiftUI tests on master since this PR was opened. The CI build rebases before building, so it was pulling in the SwiftUI changes which don't compile on Xcode 10. I added some Swift version checks to only compile those on Xcode 11+. This shouldn't affect anything since those tests are marked as iOS 13+ anyway.

fbernutz commented 3 years ago

Sorry for the issues with this because of the SwiftUI views. I took a look at it and I could get the tests run locally (Xcode 10.3, 11.3.1 and 12.2) with the following changes:

NickEntin commented 3 years ago

Oh awesome, that's a super clean fix. Thanks @fbernutz! No worries about the issues, the required Xcode version support was kind of vague.