Skip to content

Test action

Test action #35

Workflow file for this run

# This workflow runs CI tests for the main package and Examples package
name: CI
# Trigger the workflow on push to main, any pull request, or manual dispatch
on:
push:
branches:
- main
pull_request:
branches:
- '*'
workflow_dispatch:
# Ensure only one workflow per ref is running at a time
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
macos:
name: macOS - ${{ matrix.package }} (Xcode ${{ matrix.xcode }})
runs-on: macos-14
strategy:
matrix:
xcode:
- '15.4'
package:
- 'main'
- 'Examples'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Print Swift version
run: swift --version
# Set working directory to Examples if testing the examples package
- name: Set working directory
run: |
if [ "${{ matrix.package }}" = "Examples" ]; then
cd Examples
fi
- name: Build package
run: swift build
- name: Run tests
run: swift test
check-compatibility:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Run Macro Compatibility Check
uses: Matejkob/swift-macro-compatibility-check@v1.1.4