Skip to content

Commit

Permalink
Update swift version and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmassicotte committed Sep 3, 2023
1 parent 20a4d92 commit 4570e52
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 38 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,24 @@ name: CI
on:
push:
branches:
- main
- '*'
pull_request:
branches:
- '**'
- main

env:
DEVELOPER_DIR: /Applications/Xcode_15.0.app/Contents/Developer

jobs:
test:
name: Test
runs-on: macOS-latest
runs-on: macOS-13
strategy:
matrix:
destination:
- "platform=macOS"

steps:
- uses: actions/checkout@v2
- name: swift test
run: swift test
- uses: actions/checkout@v3
- name: Test platform ${{ matrix.destination }}
run: set -o pipefail && xcodebuild -scheme TextViewPlus -destination "${{ matrix.destination }}" test | xcpretty
30 changes: 17 additions & 13 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
// swift-tools-version:5.0
// swift-tools-version: 5.8

import PackageDescription

let settings: [SwiftSetting] = [
.enableExperimentalFeature("StrictConcurrency")
]

let package = Package(
name: "TextViewPlus",
platforms: [.macOS(.v10_12)],
products: [
.library(name: "TextViewPlus", targets: ["TextViewPlus"]),
],
dependencies: [
.package(url: "https://github.com/ChimeHQ/Rearrange", from: "1.4.0"),
],
targets: [
.target(name: "TextViewPlus", dependencies: ["Rearrange"]),
.testTarget(name: "TextViewPlusTests", dependencies: ["TextViewPlus"]),
]
name: "TextViewPlus",
platforms: [.macOS(.v10_13)],
products: [
.library(name: "TextViewPlus", targets: ["TextViewPlus"]),
],
dependencies: [
.package(url: "https://github.com/ChimeHQ/Rearrange", from: "1.4.0"),
],
targets: [
.target(name: "TextViewPlus", dependencies: ["Rearrange"], swiftSettings: settings),
.testTarget(name: "TextViewPlusTests", dependencies: ["TextViewPlus"], swiftSettings: settings),
]
)
11 changes: 1 addition & 10 deletions Tests/TextViewPlusTests/TestableTextView.swift
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
//
// TestableTextView.swift
// TextViewPlusTests
//
// Created by Matt Massicotte on 2020-01-03.
// Copyright © 2020 ChimeHq. All rights reserved.
//

import Foundation
import class AppKit.NSTextView
import AppKit

class TestableTextView: NSTextView {
var settableUndoManager = UndoManager()
Expand Down
11 changes: 2 additions & 9 deletions Tests/TextViewPlusTests/TextViewPlusTests.swift
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
//
// TextViewPlusTests.swift
// TextViewPlusTests
//
// Created by Matt Massicotte on 2020-01-03.
// Copyright © 2020 ChimeHq. All rights reserved.
//

import XCTest
@testable import TextViewPlus

class TextViewPlusTests: XCTestCase {
@MainActor
final class TextViewPlusTests: XCTestCase {
func testProgrammaticModificationOfAttributedString() {
let textView = TestableTextView(string: "abc")

Expand Down

0 comments on commit 4570e52

Please sign in to comment.