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

iOS CI #143

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
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
22 changes: 19 additions & 3 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,32 @@ concurrency:

jobs:
build:
runs-on: macos-latest
runs-on: macos-14
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.4'
xcode-version: '15.0.1'
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17

- name: Build iOS app
run: xcodebuild -allowProvisioningUpdates -workspace iosApp/iosApp.xcodeproj/project.xcworkspace -configuration Debug -scheme iosApp -sdk iphonesimulator
run: |
xcodebuild -allowProvisioningUpdates \
-workspace iosApp/iosApp.xcodeproj/project.xcworkspace \
-configuration Debug \
-scheme iosApp \
-sdk iphonesimulator \
|| true # Continue even if build fails

- name: Upload XCode Result Bundle
if: always() # This ensures the step runs even if previous steps fail
uses: actions/upload-artifact@v3
with:
name: xcode-result-bundle
path: |
/var/folders/g6/rgtlsw6n123b0gt5483s5_cm0000gn/T/ResultBundle_*.xcresult
iosApp/iosApp.xcodeproj/project.xcworkspace
retention-days: 5
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ The CI will fail if the code is not properly formatted. Please correct any failu

Take into account that changes and requests can be rejected if they don't align with the **purpose
of the library**. To ensure you do not waste any time, you can always open an
issue [here](https://github.com/Fbada006/ArtMaker/issues?q=is%3Aissue) or talk to us before you
issue [here](https://github.com/Fbada006/ArtMaker/issues/new) or talk to us before you
start making any changes.

## License
Expand Down
27 changes: 6 additions & 21 deletions iosApp/iosApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 77;
objectVersion = 70;
objects = {

/* Begin PBXContainerItemProxy section */
Expand All @@ -30,7 +30,7 @@
/* End PBXFileReference section */

/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
3C45734E2CC77ED70048BD69 /* Exceptions for "iosApp" folder in "iosApp" target */ = {
3C45734E2CC77ED70048BD69 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
Info.plist,
Expand All @@ -40,24 +40,9 @@
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */

/* Begin PBXFileSystemSynchronizedRootGroup section */
3CE3676D2CBCFE9D00CAEED7 /* iosApp */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
3C45734E2CC77ED70048BD69 /* Exceptions for "iosApp" folder in "iosApp" target */,
);
path = iosApp;
sourceTree = "<group>";
};
3CE3677F2CBCFEA000CAEED7 /* iosAppTests */ = {
isa = PBXFileSystemSynchronizedRootGroup;
path = iosAppTests;
sourceTree = "<group>";
};
3CE367892CBCFEA000CAEED7 /* iosAppUITests */ = {
isa = PBXFileSystemSynchronizedRootGroup;
path = iosAppUITests;
sourceTree = "<group>";
};
3CE3676D2CBCFE9D00CAEED7 /* iosApp */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (3C45734E2CC77ED70048BD69 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = iosApp; sourceTree = "<group>"; };
3CE3677F2CBCFEA000CAEED7 /* iosAppTests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = iosAppTests; sourceTree = "<group>"; };
3CE367892CBCFEA000CAEED7 /* iosAppUITests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = iosAppUITests; sourceTree = "<group>"; };
/* End PBXFileSystemSynchronizedRootGroup section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -201,6 +186,7 @@
};
};
buildConfigurationList = 3CE367662CBCFE9D00CAEED7 /* Build configuration list for PBXProject "iosApp" */;
compatibilityVersion = "Xcode 15.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Expand All @@ -209,7 +195,6 @@
);
mainGroup = 3CE367622CBCFE9D00CAEED7;
minimizedProjectReferenceProxies = 1;
preferredProjectObjectVersion = 77;
productRefGroup = 3CE3676C2CBCFE9D00CAEED7 /* Products */;
projectDirPath = "";
projectRoot = "";
Expand Down
Binary file not shown.
18 changes: 9 additions & 9 deletions iosApp/iosAppTests/iosAppTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
// Created by Caleb Langat on 14/10/2024.
//

import Testing

struct iosAppTests {

@Test func example() async throws {
// Write your test here and use APIs like `#expect(...)` to check expected conditions.
}

}
//import Testing
//
//struct iosAppTests {
//
// @Test func example() async throws {
// // Write your test here and use APIs like `#expect(...)` to check expected conditions.
// }
//
//}
72 changes: 36 additions & 36 deletions iosApp/iosAppUITests/iosAppUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,39 @@
// Created by Caleb Langat on 14/10/2024.
//

import XCTest

final class iosAppUITests: XCTestCase {

override func setUpWithError() throws {
// Put setup code here. This method is called before the invocation of each test method in the class.

// In UI tests it is usually best to stop immediately when a failure occurs.
continueAfterFailure = false

// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
}

override func tearDownWithError() throws {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}

@MainActor
func testExample() throws {
// UI tests must launch the application that they test.
let app = XCUIApplication()
app.launch()

// Use XCTAssert and related functions to verify your tests produce the correct results.
}

@MainActor
func testLaunchPerformance() throws {
if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) {
// This measures how long it takes to launch your application.
measure(metrics: [XCTApplicationLaunchMetric()]) {
XCUIApplication().launch()
}
}
}
}
//import XCTest
//
//final class iosAppUITests: XCTestCase {
//
// override func setUpWithError() throws {
// // Put setup code here. This method is called before the invocation of each test method in the class.
//
// // In UI tests it is usually best to stop immediately when a failure occurs.
// continueAfterFailure = false
//
// // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
// }
//
// override func tearDownWithError() throws {
// // Put teardown code here. This method is called after the invocation of each test method in the class.
// }
//
// @MainActor
// func testExample() throws {
// // UI tests must launch the application that they test.
// let app = XCUIApplication()
// app.launch()
//
// // Use XCTAssert and related functions to verify your tests produce the correct results.
// }
//
// @MainActor
// func testLaunchPerformance() throws {
// if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) {
// // This measures how long it takes to launch your application.
// measure(metrics: [XCTApplicationLaunchMetric()]) {
// XCUIApplication().launch()
// }
// }
// }
//}
52 changes: 26 additions & 26 deletions iosApp/iosAppUITests/iosAppUITestsLaunchTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@
// Created by Caleb Langat on 14/10/2024.
//

import XCTest

final class iosAppUITestsLaunchTests: XCTestCase {

override class var runsForEachTargetApplicationUIConfiguration: Bool {
true
}

override func setUpWithError() throws {
continueAfterFailure = false
}

@MainActor
func testLaunch() throws {
let app = XCUIApplication()
app.launch()

// Insert steps here to perform after app launch but before taking a screenshot,
// such as logging into a test account or navigating somewhere in the app

let attachment = XCTAttachment(screenshot: app.screenshot())
attachment.name = "Launch Screen"
attachment.lifetime = .keepAlways
add(attachment)
}
}
//import XCTest
//
//final class iosAppUITestsLaunchTests: XCTestCase {
//
// override class var runsForEachTargetApplicationUIConfiguration: Bool {
// true
// }
//
// override func setUpWithError() throws {
// continueAfterFailure = false
// }
//
// @MainActor
// func testLaunch() throws {
// let app = XCUIApplication()
// app.launch()
//
// // Insert steps here to perform after app launch but before taking a screenshot,
// // such as logging into a test account or navigating somewhere in the app
//
// let attachment = XCTAttachment(screenshot: app.screenshot())
// attachment.name = "Launch Screen"
// attachment.lifetime = .keepAlways
// add(attachment)
// }
//}
Loading