Skip to content

Commit

Permalink
Merge pull request #6 from MFB-Technologies-Inc/feature/update-workflow
Browse files Browse the repository at this point in the history
Feature/update workflow
  • Loading branch information
roanutil authored Apr 25, 2023
2 parents e399807 + 6b2305b commit 79ba46f
Show file tree
Hide file tree
Showing 33 changed files with 126 additions and 99 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- '*'
workflow_dispatch:

jobs:
lint:
runs-on: macos-13
environment: default
steps:
- uses: actions/checkout@v3
- name: Format lint
run: swiftformat --lint .
- name: Lint
run: swiftlint .
ui-tests:
strategy:
matrix:
include:
- os: macos-12
xcode: 13.2.1 # Swift 5.5.2
sim: iPhone 13
- os: macos-12
xcode: 13.4.1 # Swift 5.6
sim: iPhone 13
- os: macos-13
xcode: 14.2 # Swift 5.7
sim: iPhone 14
- os: macos-13
xcode: 14.3 # Swift 5.8
sim: iPhone 14
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run tests
run: xcodebuild -project ./Example/Example.xcodeproj -scheme Example test -destination platform='iOS Simulator',name='${{ matrix.sim }}' -quiet -enableCodeCoverage YES -derivedDataPath "./output"
30 changes: 0 additions & 30 deletions .github/workflows/test.yml

This file was deleted.

1 change: 1 addition & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ identifier_name:
- _max
- or
- by
- up
type_name:
allowed_symbols: "_"
excluded:
Expand Down
46 changes: 29 additions & 17 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1330;
LastUpgradeCheck = 1330;
LastUpgradeCheck = 1430;
TargetAttributes = {
49A241B22800EBBC003DD15F = {
CreatedOnToolsVersion = 13.3;
Expand Down Expand Up @@ -425,11 +425,12 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = "Example-macOS/Example_macOS.entitlements";
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Example-macOS/Preview Content\"";
DEVELOPMENT_TEAM = D79J55YKW6;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -442,6 +443,7 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.mfbtech.picker-better.Example-macOS";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_STRICT_CONCURRENCY = complete;
Expand All @@ -456,11 +458,12 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = "Example-macOS/Example_macOS.entitlements";
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Example-macOS/Preview Content\"";
DEVELOPMENT_TEAM = D79J55YKW6;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -473,6 +476,7 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.mfbtech.picker-better.Example-macOS";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_STRICT_CONCURRENCY = complete;
Expand All @@ -485,10 +489,10 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Example-tvOS/Preview Content\"";
DEVELOPMENT_TEAM = D79J55YKW6;
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
Expand All @@ -500,6 +504,7 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.mfbtech.picker-better.Example-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = appletvos;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_STRICT_CONCURRENCY = complete;
Expand All @@ -514,10 +519,10 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Example-tvOS/Preview Content\"";
DEVELOPMENT_TEAM = D79J55YKW6;
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
Expand All @@ -529,6 +534,7 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.mfbtech.picker-better.Example-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = appletvos;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_STRICT_CONCURRENCY = complete;
Expand Down Expand Up @@ -660,10 +666,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Example/Example.entitlements;
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Example/Preview Content\"";
DEVELOPMENT_TEAM = D79J55YKW6;
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
Expand All @@ -681,6 +687,7 @@
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
PRODUCT_BUNDLE_IDENTIFIER = "com.pick-better.Example";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTS_MACCATALYST = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_STRICT_CONCURRENCY = complete;
Expand All @@ -697,10 +704,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Example/Example.entitlements;
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Example/Preview Content\"";
DEVELOPMENT_TEAM = D79J55YKW6;
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
Expand All @@ -718,6 +725,7 @@
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
PRODUCT_BUNDLE_IDENTIFIER = "com.pick-better.Example";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTS_MACCATALYST = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_STRICT_CONCURRENCY = complete;
Expand All @@ -732,13 +740,15 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = D79J55YKW6;
DEVELOPMENT_TEAM = "";
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.pick-better.ExampleUITests";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_STRICT_CONCURRENCY = complete;
SWIFT_VERSION = 5.0;
Expand All @@ -751,13 +761,15 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = D79J55YKW6;
DEVELOPMENT_TEAM = "";
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.pick-better.ExampleUITests";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_STRICT_CONCURRENCY = complete;
SWIFT_VERSION = 5.0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1330"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1330"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Example/Example/ExampleApp.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ExampleApp.swift
// PickBetter
//
// Copyright © 2022 MFB Technologies, Inc. All rights reserved. All rights reserved.
// Copyright © 2023 MFB Technologies, Inc. All rights reserved. All rights reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
Expand Down
2 changes: 1 addition & 1 deletion Example/ExampleUITests/ExampleUITestCase.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ExampleUITestCase.swift
// PickBetter
//
// Copyright © 2022 MFB Technologies, Inc. All rights reserved. All rights reserved.
// Copyright © 2023 MFB Technologies, Inc. All rights reserved. All rights reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
Expand Down
4 changes: 2 additions & 2 deletions Example/ExampleUITests/MutliValueUITests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// MutliValueUITests.swift
// PickBetter
//
// Copyright © 2022 MFB Technologies, Inc. All rights reserved. All rights reserved.
// Copyright © 2023 MFB Technologies, Inc. All rights reserved. All rights reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
Expand Down Expand Up @@ -35,7 +35,7 @@ final class MultiValueUITests: ExampleUITestCase {
XCTAssert(try buttonZero().exists, "Button Zero must exist")
XCTAssert(try buttonOne().exists, "Button One must exist")
XCTAssert(
try !buttonZero().isSelected && (try !buttonOne().isSelected),
try !buttonZero().isSelected && (!buttonOne().isSelected),
"Initial state should have no item selected"
)

Expand Down
4 changes: 2 additions & 2 deletions Example/ExampleUITests/SingleOptionalValueTests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SingleOptionalValueTests.swift
// PickBetter
//
// Copyright © 2022 MFB Technologies, Inc. All rights reserved. All rights reserved.
// Copyright © 2023 MFB Technologies, Inc. All rights reserved. All rights reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
Expand Down Expand Up @@ -37,7 +37,7 @@ final class SingleOptionalValueUITests: ExampleUITestCase {
XCTAssert(try buttonZero().exists, "Button Zero must exist")
XCTAssert(try buttonOne().exists, "Button One must exist")
XCTAssert(
try !buttonZero().isSelected && (try !buttonOne().isSelected),
try !buttonZero().isSelected && (!buttonOne().isSelected),
"Initial state should have no item selected"
)

Expand Down
14 changes: 7 additions & 7 deletions Example/ExampleUITests/SingleValueUITests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SingleValueUITests.swift
// PickBetter
//
// Copyright © 2022 MFB Technologies, Inc. All rights reserved. All rights reserved.
// Copyright © 2023 MFB Technologies, Inc. All rights reserved. All rights reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
Expand All @@ -26,7 +26,7 @@ final class SingleValueUITests: ExampleUITestCase {
_ = try sectionNavItem().waitForExistence(timeout: 1)
XCTAssert(try sectionNavItem().exists, "Navigation link/tab for 'Single' value picker must exist")
#if os(tvOS)
guard try findVertically(try sectionNavItem(), method: .upOnly) else {
guard try findVertically(sectionNavItem(), method: .upOnly) else {
XCTFail("Failed to find navigation picker")
return
}
Expand All @@ -42,11 +42,11 @@ final class SingleValueUITests: ExampleUITestCase {
XCTAssert(try buttonZero().isSelected, "Initial state should have the first item selected which is '0'")

#if os(tvOS)
guard try findVertically(try button(3), method: .downOnly) else {
guard try findVertically(button(3), method: .downOnly) else {
XCTFail("Failed to find '3' to select it.")
return
}
guard try findHorizontally(try buttonZero(), method: .leftOnly) else {
guard try findHorizontally(buttonZero(), method: .leftOnly) else {
XCTFail("Failed to find '0'")
return
}
Expand All @@ -56,7 +56,7 @@ final class SingleValueUITests: ExampleUITestCase {
XCTAssert(try !buttonOne().isSelected, "'1' should not be selected before being tapped.")

#if os(tvOS)
guard try findHorizontally(try buttonOne(), method: .rightOnly) else {
guard try findHorizontally(buttonOne(), method: .rightOnly) else {
XCTFail("Failed to find '1' to select it.")
return
}
Expand All @@ -70,7 +70,7 @@ final class SingleValueUITests: ExampleUITestCase {
func testGridStyleDeselectAndSelectNew() throws {
_ = try gridStyleToggle().waitForExistence(timeout: 1)
#if os(tvOS)
guard try findVertically(try gridStyleToggle(), method: .downOnly) else {
guard try findVertically(gridStyleToggle(), method: .downOnly) else {
XCTFail("Failed to find grid toggle")
return
}
Expand All @@ -83,7 +83,7 @@ final class SingleValueUITests: ExampleUITestCase {
func testListStyleDeselectAndSelectNew() throws {
_ = try gridStyleToggle().waitForExistence(timeout: 1)
#if os(tvOS)
guard try findVertically(try gridStyleToggle(), method: .downOnly) else {
guard try findVertically(gridStyleToggle(), method: .downOnly) else {
XCTFail("Failed to find grid toggle")
return
}
Expand Down
2 changes: 1 addition & 1 deletion Example/ExampleUITests/XCUIElement+Trigger.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// XCUIElement+Trigger.swift
// PickBetter
//
// Copyright © 2022 MFB Technologies, Inc. All rights reserved. All rights reserved.
// Copyright © 2023 MFB Technologies, Inc. All rights reserved. All rights reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
Expand Down
Loading

0 comments on commit 79ba46f

Please sign in to comment.