Skip to content

Adding Swift 6 lang and language mode support #111

Adding Swift 6 lang and language mode support

Adding Swift 6 lang and language mode support #111

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.
name: Swift Unit Tests
on:
pull_request:
branches:
- main
- develop
push:
branches:
- main
- develop
tags:
- '*' # Push events to every tag
jobs:
swift_tests_latest:
name: Latest Swift Version
runs-on: macos-15
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "16.0"
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: .build
key: macos-latest-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
macos-latest-spm-
- name: Build
run: swift build
- name: Run tests
run: swift test
swift_tests_previous:
name: Swift Version ${{ matrix.swift }}
strategy:
matrix:
os: [macos-13]
swift: ["5.10", "5.9", "5.8"]
runs-on: ${{ matrix.os }}
steps:
- uses: swift-actions/setup-swift@v1
with:
swift-version: ${{ matrix.swift }}
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "14.3.1"
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: .build
key: ${{ matrix.os }}-${{ matrix.swift }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ matrix.os }}-spm-
- name: Build
run: swift build
- name: Run tests
run: swift test
ios_tests_latest:
name: iOS Unit Tests - Latest Swift
runs-on: macos-15
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "16.0"
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: .build
key: macos-15-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
macos-15-spm-
- name: Build
run: xcodebuild build -scheme SyntaxSparrow -destination "OS=18.1,name=iPhone 16"
- name: Test
run: xcodebuild test -scheme SyntaxSparrow -destination "OS=18.1,name=iPhone 16" -enableCodeCoverage YES
ios_tests_previous:
name: iOS Unit Tests
strategy:
matrix:
os: [macos-13]
swift: ["5.10", "5.9", "5.8"]
runs-on: ${{ matrix.os }}
steps:
- uses: swift-actions/setup-swift@v1
with:
swift-version: ${{ matrix.swift }}
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: .build
key: ${{ matrix.os }}-${{ matrix.swift }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ matrix.os }}-spm-
- name: Build
run: xcodebuild build -scheme SyntaxSparrow -destination "OS=17.2,name=iPhone 13"
- name: Test
run: xcodebuild test-without-building -scheme SyntaxSparrow -destination "name=iPhone 13" -enableCodeCoverage YES