Skip to content
Merged
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
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
test:
name: Swift ${{ matrix.swift }} on Xcode ${{ matrix.xcode }}
runs-on: ${{ matrix.runs-on }}
env:
DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer"
strategy:
fail-fast: false
matrix:
include:
- swift: "6.0"
xcode: "16.0"
runs-on: macos-15
- swift: "6.1"
xcode: "16.3"
runs-on: macos-15
- swift: "6.2"
xcode: "26.0"
runs-on: macos-26

steps:
- uses: actions/checkout@v4

- name: Build
run: swift build -v

- name: Test
run: swift test -v
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ let package = Package(
dependencies: [
.product(name: "EventSource", package: "EventSource")
],
path: "Sources/HuggingFace",
path: "Sources/HuggingFace"
),
.testTarget(
name: "HuggingFaceTests",
Expand Down
2 changes: 1 addition & 1 deletion Tests/HuggingFaceTests/Helpers/MockURLProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ final class MockURLProtocol: URLProtocol, @unchecked Sendable {

private init() {}

func withLock<T>(_ operation: @Sendable () async throws -> T) async rethrows -> T {
func withLock<T: Sendable>(_ operation: @Sendable () async throws -> T) async rethrows -> T {
// Wait for lock to be available
while isLocked {
try? await Task.sleep(for: .milliseconds(10))
Expand Down