-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added TestBuidPackage to ensure Proton can be added without build iss…
…ues as an package in another package (#124)
- Loading branch information
Showing
7 changed files
with
70 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'docs/**' | ||
push: | ||
page_build: | ||
pull_request: | ||
branches: [ master ] | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
|
@@ -23,6 +23,8 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- name: Build and Test Proton | ||
run: xcodebuild build test -destination "name=iPhone 11 Pro" -scheme "Proton" | ||
- name: Build and Test Proton as dependency in another package | ||
run: xcodebuild build -destination "name=iPhone 11 Pro" -scheme "TestBuildPackage" | ||
- name: Capture Proton Code Coverage | ||
uses: codecov/[email protected] | ||
- name: Build Example App | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.DS_Store | ||
/.build | ||
/Packages | ||
/*.xcodeproj | ||
xcuserdata/ | ||
DerivedData/ | ||
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// swift-tools-version:5.3 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "TestBuildPackage", | ||
platforms: [ | ||
.iOS(.v11), | ||
.macOS(.v10_15) | ||
], | ||
products: [ | ||
// Products define the executables and libraries a package produces, and make them visible to other packages. | ||
.library( | ||
name: "TestBuildPackage", | ||
targets: ["TestBuildPackage"]), | ||
], | ||
dependencies: [ | ||
// Dependencies declare other packages that this package depends on. | ||
.package(name: "Proton", path: "../") | ||
], | ||
targets: [ | ||
// Targets are the basic building blocks of a package. A target can define a module or a test suite. | ||
// Targets can depend on other targets in this package, and on products in packages this package depends on. | ||
.target( | ||
name: "TestBuildPackage", | ||
dependencies: ["Proton"]), | ||
.testTarget( | ||
name: "TestBuildPackageTests", | ||
dependencies: ["TestBuildPackage"]), | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# TestBuildPackage | ||
|
||
A description of this package. |
8 changes: 8 additions & 0 deletions
8
TestBuildPackage/Sources/TestBuildPackage/TestBuildPackage.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import Proton | ||
|
||
// The purpose of this package is only to validate Proton as a dependency | ||
// and ensure that imports like UIKit are not missed when adding a new file | ||
// For ref: https://github.com/rajdeep/proton/pull/123 | ||
struct TestBuildPackage { | ||
var text = "Hello, World!" | ||
} |
11 changes: 11 additions & 0 deletions
11
TestBuildPackage/Tests/TestBuildPackageTests/TestBuildPackageTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import XCTest | ||
@testable import TestBuildPackage | ||
|
||
final class TestBuildPackageTests: XCTestCase { | ||
func testExample() { | ||
// This is an example of a functional test case. | ||
// Use XCTAssert and related functions to verify your tests produce the correct | ||
// results. | ||
XCTAssertEqual(TestBuildPackage().text, "Hello, World!") | ||
} | ||
} |