Testing different Swift version on CI #24
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: MagicBell Swift Tests | |
on: | |
pull_request: | |
jobs: | |
build: | |
name: Swift ${{ matrix.swift }} on ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest] | |
swift: ["5.3", "5.4", "5.5"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: swift-actions/[email protected] | |
with: | |
swift-version: ${{ matrix.swift }} | |
- name: Get swift version | |
run: swift --version | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: SPM Cache | |
uses: actions/cache@v3 | |
with: | |
path: .build | |
key: ${{ runner.os }}-spm-${{ matrix.swift }}-${{ hashFiles('**/Package.resolved') }} | |
restore-keys: | | |
${{ runner.os }}-spm-${{ matrix.swift }} | |
- name: Build | |
run: swift build --build-tests | |
- name: Test | |
run: swift test --skip-build |