Skip to content

Commit

Permalink
Merge branch 'github-actions'
Browse files Browse the repository at this point in the history
  • Loading branch information
ephread committed May 3, 2023
2 parents dc89678 + 5dfca74 commit 682e0c7
Show file tree
Hide file tree
Showing 217 changed files with 67 additions and 74 deletions.
55 changes: 48 additions & 7 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,72 @@ on:
env:
# Expected to be used within scripts.
LANG: en_US.UTF-8
PACKAGE_TEST_DIRECTORY: "InstructionsPackageTest"
TEST_DIRECTORY: "Instructions"

# Wether or not to perform certain steps.
run_pod_lint: true
build_app_extension_example: true
run_tests: true

jobs:
test-package:
name: Check installation
runs-on: macos-13

steps:
- name: Switch Xcode version
run: sudo xcode-select --switch /Applications/Xcode_14.3.app

- name: Check out test repository
uses: actions/checkout@v2
with:
repository: "ephread/InstructionsPackageTest"
path: ${{ env.PACKAGE_TEST_DIRECTORY }}

- name: Install test dependencies
working-directory: ./${{ env.PACKAGE_TEST_DIRECTORY }}
run: |
bundle install
- name: Test SwiftPM import
working-directory: ./${{ env.PACKAGE_TEST_DIRECTORY }}
run: |
bundle exec fastlane test_swiftpm
- name: Test CocoaPods import
working-directory: ./${{ env.PACKAGE_TEST_DIRECTORY }}
run: |
bundle exec fastlane test_cocoapods
- name: Test Carthage import
working-directory: ./${{ env.PACKAGE_TEST_DIRECTORY }}
run: |
bundle exec fastlane test_carthage
test:
name: Build, lint & test
runs-on: macos-12
runs-on: macos-13

steps:
- name: Switch Xcode version
run: sudo xcode-select --switch /Applications/Xcode_13.4.app
run: sudo xcode-select --switch /Applications/Xcode_14.3.app

- name: Check out the repository
uses: actions/checkout@v2
with:
path: ${{ env.TEST_DIRECTORY }}

- name: Install test dependencies
working-directory: ./${{ env.TEST_DIRECTORY }}
run: |
bundle install
- name: Run Cocoapods' linter
if: env.run_pod_lint == 'true'
# Warnings might be allowed in versions where Instructions continue to support
# deprecated methods.
working-directory: ./${{ env.TEST_DIRECTORY }}
# Warnings might be allowed in versions where Instructions
# continue to support deprecated methods.
run: |
if [ $ALLOW_WARNINGS == "YES" ]; then
pod lib lint --allow-warnings;
Expand All @@ -50,6 +90,7 @@ jobs:
- name: Run tests
if: env.run_tests == 'true'
working-directory: ./${{ env.TEST_DIRECTORY }}
run: |
bundle exec fastlane test_all
Expand All @@ -58,13 +99,13 @@ jobs:
if: failure() && env.run_tests == 'true'
with:
name: FailureDiffs
path: "${{github.workspace}}/Examples/Example/Snapshot\ Tests/Supporting\ Files/Snapshots/FailureDiffs/"
path: "${{github.workspace}}/${{env.TEST_DIRECTORY}}/Examples/Example/Snapshot\ Tests/Supporting\ Files/Snapshots/FailureDiffs/"

- name: Convert and upload coverage
uses: paambaati/[email protected]
if: env.run_tests == 'true'
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
with:
coverageCommand: "slather coverage -x --build-directory Build/"
coverageLocations: "${{github.workspace}}/Tests/cobertura.xml:cobertura"
coverageCommand: "cd '${{env.TEST_DIRECTORY}}' && slather coverage -x --build-directory Build/"
coverageLocations: "${{github.workspace}}/${{env.TEST_DIRECTORY}}/Tests/cobertura.xml:cobertura"
56 changes: 0 additions & 56 deletions .github/workflows/package-management.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class DefaultExampleSnapshotTests: FBSnapshotTestCase {
Thread.sleep(forTimeInterval: 0.1)

let orientation = XCUIDevice.shared.orientation
let image = app.screenshot().image
let image = XCUIScreen.main.screenshot().image
let imageView = UIImageView(image: image.cropped(using: orientation))

let identifier = """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ extension Device {

private var xSeries2ndGen: [Device] {
[.iPhone12, .iPhone12Pro, .iPhone12ProMax,
.iPhone13, .iPhone13Pro, .iPhone13ProMax]
.iPhone13, .iPhone13Pro, .iPhone13ProMax,
.iPhone14, .iPhone14Plus]
}

private var xSeries3ndGen: [Device] {
[.iPhone14Pro, .iPhone14ProMax]
}

func homeIndicatorHeight(for orientation: UIDeviceOrientation) -> CGFloat {
Expand Down Expand Up @@ -66,6 +71,10 @@ extension Device {
return 47
}

if (xSeries3ndGen + xSeries3ndGen.map(Device.simulator)).contains(self) {
return 59
}

return 0
}
}
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed ...mpleSnapshotTests/[email protected]
Diff not rendered.
Binary file removed ...eSnapshotTests/[email protected]
Diff not rendered.
Binary file added ...eSnapshotTests/[email protected]
Diff not rendered.
Diff not rendered.
Binary file removed ...mpleSnapshotTests/[email protected]
Diff not rendered.
Binary file removed ...eSnapshotTests/[email protected]
Diff not rendered.
Binary file added ...eSnapshotTests/[email protected]
Diff not rendered.
Diff not rendered.
Binary file removed ...mpleSnapshotTests/[email protected]
Diff not rendered.
Binary file removed ...eSnapshotTests/[email protected]
Diff not rendered.
Binary file added ...eSnapshotTests/[email protected]
Diff not rendered.
Diff not rendered.
Binary file removed ...mpleSnapshotTests/[email protected]
Diff not rendered.
Binary file removed ...eSnapshotTests/[email protected]
Diff not rendered.
Binary file added ...eSnapshotTests/[email protected]
Diff not rendered.
Diff not rendered.
Binary file removed ...mpleSnapshotTests/[email protected]
Diff not rendered.
Binary file removed ...eSnapshotTests/[email protected]
Diff not rendered.
Binary file added ...eSnapshotTests/[email protected]
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
8 changes: 4 additions & 4 deletions Examples/Instructions Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1351,16 +1351,16 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/devicekit/DeviceKit";
requirement = {
branch = master;
kind = branch;
kind = exactVersion;
version = 5.0.0;
};
};
B6CC2F242736AFB6009EB089 /* XCRemoteSwiftPackageReference "ios-snapshot-test-case" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/uber/ios-snapshot-test-case";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 8.0.0;
kind = exactVersion;
version = 8.0.0;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/devicekit/DeviceKit",
"state" : {
"branch" : "master",
"revision" : "da57c444cbb7b6159aa871534d4cf2616d1d55c6"
"revision" : "691fe8112cca20ebf0020a1709d4e0205400311c",
"version" : "5.0.0"
}
},
{
Expand Down
5 changes: 2 additions & 3 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ default_platform(:ios)
platform :ios do

DEVICES = [
"iPad Pro (11-inch) (3rd generation)",
"iPad (9th generation)",
"iPhone 13 Pro",
"iPad (10th generation)",
"iPhone 14 Pro",
"iPhone SE (3rd generation)"
]

Expand Down

0 comments on commit 682e0c7

Please sign in to comment.