-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db884e5
commit bd2220a
Showing
6 changed files
with
92 additions
and
0 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
github: [mattmassicotte] |
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,35 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- 'README.md' | ||
- 'CODE_OF_CONDUCT.md' | ||
- '.editorconfig' | ||
- '.spi.yml' | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: macOS-13 | ||
strategy: | ||
matrix: | ||
destination: | ||
- "platform=macOS" | ||
- "platform=macOS,variant=Mac Catalyst" | ||
- "platform=iOS Simulator,name=iPhone 11" | ||
- "platform=tvOS Simulator,name=Apple TV" | ||
- "platform=visionOS Simulator,name=Apple Vision Pro" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Test platform ${{ matrix.destination }} | ||
run: set -o pipefail && xcodebuild -scheme Textbook -destination "${{ matrix.destination }}" test | xcbeautify |
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,30 @@ | ||
// swift-tools-version: 5.8 | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "Textbook", | ||
platforms: [ | ||
.macOS(.v10_15), | ||
.macCatalyst(.v13), | ||
.iOS(.v13), | ||
.tvOS(.v13), | ||
], | ||
products: [ | ||
.library(name: "Textbook", targets: ["Textbook"]), | ||
], | ||
targets: [ | ||
.target(name: "Textbook"), | ||
.testTarget(name: "TextbookTests", dependencies: ["Textbook"]), | ||
] | ||
) | ||
|
||
let swiftSettings: [SwiftSetting] = [ | ||
.enableExperimentalFeature("StrictConcurrency"), | ||
] | ||
|
||
for target in package.targets { | ||
var settings = target.swiftSettings ?? [] | ||
settings.append(contentsOf: swiftSettings) | ||
target.swiftSettings = settings | ||
} |
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,12 @@ | ||
import SwiftUI | ||
|
||
#if os(macOS) && !targetEnvironment(macCatalyst) | ||
import AppKit | ||
|
||
typealias NSUITextView = NSTextView | ||
|
||
#elseif os(iOS) || os(tvOS) || os(visionOS) | ||
import UIKit | ||
|
||
typealias NSUITextView = UITextView | ||
#endif |
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,2 @@ | ||
// The Swift Programming Language | ||
// https://docs.swift.org/swift-book |
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,12 @@ | ||
import XCTest | ||
@testable import Textbook | ||
|
||
final class TextbookTests: XCTestCase { | ||
func testExample() throws { | ||
// XCTest Documentation | ||
// https://developer.apple.com/documentation/xctest | ||
|
||
// Defining Test Cases and Test Methods | ||
// https://developer.apple.com/documentation/xctest/defining_test_cases_and_test_methods | ||
} | ||
} |