Upgrade everything to Swift 5.9 and Sendable correctness, use SwiftHTTPTypes #103
Workflow file for this run
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
name: Tests | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: { types: [opened, reopened, synchronize, ready_for_review] } | |
push: { branches: [ main ] } | |
env: | |
LOG_LEVEL: info | |
jobs: | |
appleos: | |
if: ${{ !(github.event.pull_request.draft || false) }} | |
strategy: | |
fail-fast: false | |
matrix: | |
xcode: | |
- latest | |
#- latest-stable | |
platform: | |
- 'macOS' | |
- 'iOS Simulator' | |
- 'tvOS Simulator' | |
- 'watchOS Simulator' | |
include: | |
- platform: 'macOS' | |
destination: 'arch=x86_64' | |
- platform: 'iOS Simulator' | |
destination: 'OS=latest,name=iPhone 15 Pro' | |
- platform: 'tvOS Simulator' | |
destination: 'OS=latest,name=Apple TV 4K (3rd generation)' | |
- platform: 'watchOS Simulator' | |
destination: 'OS=latest,name=Apple Watch Series 9 (45mm)' | |
name: ${{ matrix.platform }} Tests | |
runs-on: macos-13 | |
steps: | |
- name: Select latest available Xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: ${{ matrix.xcode }} | |
- name: Install xcbeautify | |
run: brew install xcbeautify | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run tests | |
env: | |
DESTINATION: ${{ format('platform={0},{1}', matrix.platform, matrix.destination) }} | |
run: | | |
set -o pipefail && \ | |
xcodebuild test -scheme StructuredAPIClient-Package \ | |
-enableThreadSanitizer YES \ | |
-enableCodeCoverage YES \ | |
-disablePackageRepositoryCache \ | |
-destination "${DESTINATION}" | | |
xcbeautify --is-ci --quiet --renderer github-actions | |
linux: | |
if: ${{ !(github.event.pull_request.draft || false) }} | |
strategy: | |
fail-fast: false | |
matrix: | |
swift-image: | |
- swift:5.9-jammy | |
- swiftlang/swift:nightly-5.10-jammy | |
- swiftlang/swift:nightly-main-jammy | |
name: Linux ${{ matrix.swift-image }} Tests | |
runs-on: ubuntu-latest | |
container: ${{ matrix.swift-image }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install xcbeautify | |
run: | | |
DEBIAN_FRONTEND=noninteractive apt-get update | |
DEBIAN_FRONTEND=noninteractive apt-get install -y xz-utils curl | |
curl -fsSLO 'https://github.com/tuist/xcbeautify/releases/download/1.0.1/xcbeautify-1.0.1-x86_64-unknown-linux-gnu.tar.xz' | |
tar -x -J -f xcbeautify-1.0.1-x86_64-unknown-linux-gnu.tar.xz | |
- name: Run tests | |
shell: bash | |
run: | | |
set -o pipefail && \ | |
swift test --sanitize=thread --enable-code-coverage | | |
./xcbeautify --is-ci --quiet --renderer github-actions |