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

Update CI actions #1184

Merged
merged 3 commits into from
Dec 17, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/carthage.yml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ on:
jobs:
carthage:
name: Carthage Build
runs-on: macos-12
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
14 changes: 8 additions & 6 deletions .github/workflows/ci-swiftpm.yml
Original file line number Diff line number Diff line change
@@ -11,24 +11,24 @@ on:
- "*"

jobs:
swiftpm_darwin_monterey:
swiftpm_darwin_ventura:
name: SwiftPM, Darwin, Xcode ${{ matrix.xcode }}
runs-on: macos-12
runs-on: macos-13
strategy:
matrix:
xcode: ["14.0.1", "14.1", "14.2"]
xcode: ["14.3.1"]
env:
DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app"
steps:
- uses: actions/checkout@v4
- run: ./test swiftpm

swiftpm_darwin_ventura:
swiftpm_darwin_sonoma:
name: SwiftPM, Darwin, Xcode ${{ matrix.xcode }}
runs-on: macos-13
runs-on: macos-14
strategy:
matrix:
xcode: ["14.3.1"]
xcode: ["15.3", "16.1"]
env:
DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app"
steps:
@@ -43,6 +43,8 @@ jobs:
container:
- swift:5.7
- swift:5.8
- swift:5.9
- swift:6.0
# - swiftlang/swift:nightly
fail-fast: false
container: ${{ matrix.container }}
16 changes: 8 additions & 8 deletions .github/workflows/ci-xcode.yml
Original file line number Diff line number Diff line change
@@ -11,12 +11,12 @@ on:
- "*"

jobs:
xcode_monterey:
xcode_ventura:
name: Xcode ${{ matrix.xcode }} (Xcode Project)
runs-on: macos-12
runs-on: macos-13
strategy:
matrix:
xcode: ["14.0.1", "14.1", "14.2"]
xcode: ["14.3.1"]
fail-fast: false
env:
DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app"
@@ -27,12 +27,12 @@ jobs:
- run: ./test tvos
- run: ./test watchos

xcode_ventura:
xcode_sonoma:
name: Xcode ${{ matrix.xcode }} (Xcode Project)
runs-on: macos-13
runs-on: macos-14
strategy:
matrix:
xcode: ["14.3.1"]
xcode: ["15.4", "16.1"]
fail-fast: false
env:
DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app"
@@ -45,10 +45,10 @@ jobs:

xcode_spm:
name: Xcode ${{ matrix.xcode }} (Swift Package)
runs-on: macos-12
runs-on: macos-14
strategy:
matrix:
xcode: ["14.0.1"]
xcode: ["16.1"]
fail-fast: false
env:
DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app"
2 changes: 1 addition & 1 deletion .github/workflows/cocoapods.yml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ on:
jobs:
cocoapods:
name: CocoaPods Lint
runs-on: macos-12
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
1 change: 1 addition & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ permissions:
jobs:
build-documentation:
runs-on: ubuntu-latest
container: swift:latest
steps:
- name: Checkout
uses: actions/checkout@v4
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -7,10 +7,10 @@ on:
jobs:
carthage_archive:
name: Darwin, Xcode 14.0
runs-on: macos-12
runs-on: macos-14
strategy:
matrix:
xcode: ["14.0.1"]
xcode: ["16.1"]
env:
DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app"
steps:
3 changes: 3 additions & 0 deletions Tests/NimbleTests/SwiftTestingSupportTest.swift
Original file line number Diff line number Diff line change
@@ -17,6 +17,8 @@ import XCTest
}
}

#if canImport(Darwin)
// the open source version of XCTest doesn't include `XCTExpectFailure`.
class MixedSwiftTestingXCTestSupport: XCTestCase {
func testAlsoRecordsErrorsToXCTest() {
XCTExpectFailure("This should fail")
@@ -29,5 +31,6 @@ class MixedSwiftTestingXCTestSupport: XCTestCase {
try require(false).to(beTrue())
}
}
#endif

#endif

Unchanged files with check annotations Beta

func testWaitUntilUsingSendable() async {
await waitUntil { done in
let queue = OperationQueue()
let op = BlockOperation {}

Check warning on line 195 in Tests/NimbleTests/AsyncAwaitTest.swift

GitHub Actions / lint

Identifier Name Violation: Variable name 'op' should be between 3 and 50 characters long (identifier_name)
op.completionBlock = done
queue.addOperation(op)
}
#endif
// swiftlint:disable:next type_body_length
final class PollingRequireTest: XCTestCase {

Check warning on line 15 in Tests/NimbleTests/PollingTest+Require.swift

GitHub Actions / lint

Superfluous Disable Command Violation: SwiftLint rule 'type_body_length' did not trigger a violation in the disabled region; remove the disable command (superfluous_disable_command)
class Error: Swift.Error {}
let errorToThrow = Error()
}
func testPollUnwrapPositiveCase() {
var value: Int? = nil

Check warning on line 53 in Tests/NimbleTests/PollingTest+Require.swift

GitHub Actions / lint

Redundant Optional Initialization Violation: Initializing an optional variable with nil is redundant (redundant_optional_initialization)
deferToMainQueue {
value = 1
}
}
#endif // #if !os(WASI)

Check warning on line 252 in Tests/NimbleTests/PollingTest+Require.swift

GitHub Actions / lint

Trailing Newline Violation: Files should have a single trailing newline (trailing_newline)
func testNegativeMatchesWithClosure() {
let moduleName = "NimbleTests"
let innerFailureMessage = "expected to equal <foo>, got <\(moduleName).NimbleError>"
let closure = { (error: Error) -> Void in

Check warning on line 131 in Tests/NimbleTests/Matchers/ThrowErrorTest.swift

GitHub Actions / lint

Redundant Void Return Violation: Returning Void in a function declaration is redundant (redundant_void_return)
expect(error._domain).to(equal("foo"))
}
}
func testDataEquality() {
let actual = "foobar".data(using: .utf8)

Check warning on line 163 in Tests/NimbleTests/Matchers/EqualTest.swift

GitHub Actions / lint

Non-optional String -> Data Conversion Violation: Prefer non-optional `Data(_:)` initializer when converting `String` to `Data` (non_optional_string_data_conversion)
let expected = "foobar".data(using: .utf8)

Check warning on line 164 in Tests/NimbleTests/Matchers/EqualTest.swift

GitHub Actions / lint

Non-optional String -> Data Conversion Violation: Prefer non-optional `Data(_:)` initializer when converting `String` to `Data` (non_optional_string_data_conversion)
let unexpected = "foobarfoo".data(using: .utf8)

Check warning on line 165 in Tests/NimbleTests/Matchers/EqualTest.swift

GitHub Actions / lint

Non-optional String -> Data Conversion Violation: Prefer non-optional `Data(_:)` initializer when converting `String` to `Data` (non_optional_string_data_conversion)
expect(actual).to(equal(expected))
expect(actual).toNot(equal(unexpected))
func testCustomNSObjectEquality() {
final class SomeObject: NSObject {
let id: Int

Check warning on line 187 in Tests/NimbleTests/Matchers/EqualTest.swift

GitHub Actions / lint

Identifier Name Violation: Variable name 'id' should be between 3 and 50 characters long (identifier_name)
init(id: Int) {

Check warning on line 189 in Tests/NimbleTests/Matchers/EqualTest.swift

GitHub Actions / lint

Identifier Name Violation: Variable name 'id' should be between 3 and 50 characters long (identifier_name)
self.id = id
}