Skip to content

fix: Emit an error when the stream closes before any response #125

fix: Emit an error when the stream closes before any response

fix: Emit an error when the stream closes before any response #125

Workflow file for this run

name: Run CI
on:
push:
branches: [ main, "4.x" ]
paths-ignore:
- '**.md' # Do not need to run CI for markdown changes.
pull_request:
branches: [ main, "4.x" ]
paths-ignore:
- '**.md'
jobs:
lint:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd
with:
xcode-version: 16.4
- uses: ./.github/actions/lint
build-apple:
runs-on: macos-15
strategy:
fail-fast: false
matrix:
destination:
- 'generic/platform=iOS'
- 'generic/platform=macOS'
- 'generic/platform=tvOS'
- 'generic/platform=watchOS'
steps:
- uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd
with:
xcode-version: 16.4
- name: Build for ${{ matrix.destination }}
run: xcodebuild build -scheme 'LDSwiftEventSource' -destination '${{ matrix.destination }}' | xcpretty
test-macos:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd
with:
xcode-version: 16.4
- uses: ./.github/actions/test-swiftpm
test-thread-sanitizer:
runs-on: ubuntu-latest
container: swift:6.1
steps:
- uses: actions/checkout@v4
- name: Test with ThreadSanitizer
# halt_on_error makes a detected data race abort with a non-zero exit so the job fails;
# without it TSan only prints a warning and the step would stay green.
env:
TSAN_OPTIONS: halt_on_error=1
run: swift test --sanitize=thread
contract-tests:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd
with:
xcode-version: 16.4
- uses: ./.github/actions/contract-tests
with:
token: ${{ secrets.GITHUB_TOKEN }}
test-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
swift-version:
- "6.0"
- "6.1"
container: swift:${{ matrix.swift-version }}
steps:
- uses: actions/checkout@v4
- name: Build and test
run: swift test
test-windows:
name: test-windows (Swift 6.1)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Swift
uses: compnerd/gha-setup-swift@cd348eb89f2f450b0664c07fb1cb66880addf17d
with:
branch: swift-6.1-release
tag: 6.1-RELEASE
- name: Build and test
run: swift test