StoryblokClient #33
Workflow file for this run
This file contains hidden or 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: Examples | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - 'Package.*' | |
| - 'Sources/**.swift' | |
| - 'Examples/**.swift' | |
| - '.github/workflows/examples.yml' | |
| - '.swiftpm/xcode/xcshareddata/xcschemes/Examples.xcscheme' | |
| pull_request: | |
| branches: [ "main" ] | |
| paths: | |
| - 'Package.*' | |
| - 'Sources/**.swift' | |
| - 'Examples/**.swift' | |
| - '.github/workflows/examples.yml' | |
| - '.swiftpm/xcode/xcshareddata/xcschemes/Examples.xcscheme' | |
| workflow_call: | |
| workflow_dispatch: | |
| concurrency: | |
| # Limit concurrency to 1 for PRs. 'main' concurrency isn't limited. | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Run example tests | |
| runs-on: macOS-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - platform: macOS | |
| build: swift build --target Examples | |
| test: swift test --filter Examples | |
| - platform: iOS | |
| build: xcodebuild build -scheme Examples -destination 'platform=iOS Simulator,name=iPhone 17' | |
| test: xcodebuild test -scheme Examples -destination 'platform=iOS Simulator,name=iPhone 17' | |
| - platform: watchOS | |
| build: xcodebuild build -scheme Examples -destination 'platform=watchOS Simulator,name=Apple Watch SE 3 (40mm)' | |
| test: xcodebuild test -scheme Examples -destination 'platform=watchOS Simulator,name=Apple Watch SE 3 (40mm)' | |
| - platform: tvOS | |
| build: xcodebuild build -scheme Examples -destination 'platform=tvOS Simulator,name=Apple TV' | |
| test: xcodebuild test -scheme Examples -destination 'platform=tvOS Simulator,name=Apple TV' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: List simulators | |
| run: xcrun simctl list | |
| - name: Build | |
| run: ${{ matrix.build }} | |
| - name: Run tests on ${{ matrix.platform }} | |
| run: ${{ matrix.test }} |