Skip to content

Rename blok to block #10

Rename blok to block

Rename blok to block #10

Workflow file for this run

name: StoryblokClient
on:
push:
branches: [ "main" ]
paths:
- 'Package.*'
- 'Sources/StoryblokClient/**.swift'
- 'Sources/StoryblokClientMacros/**.swift'
- 'Tests/StoryblokClientTests/**.swift'
- 'Tests/StoryblokClientMacroTests/**.swift'
- '.github/workflows/StoryblokClient.yml'
- '.swiftpm/xcode/xcshareddata/xcschemes/StoryblokClientTests.xcscheme'
pull_request:
branches: [ "main" ]
paths:
- 'Package.*'
- 'Sources/StoryblokClient/**.swift'
- 'Sources/StoryblokClientMacros/**.swift'
- 'Tests/StoryblokClientTests/**.swift'
- 'Tests/StoryblokClientMacroTests/**.swift'
- '.github/workflows/StoryblokClient.yml'
- '.swiftpm/xcode/xcshareddata/xcschemes/StoryblokClientTests.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:
macro-tests:
name: Run macro tests
runs-on: macOS-latest
steps:
- uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Build
run: swift build --target StoryblokClientMacroTests
- name: Run macro tests
run: swift test --filter StoryblokClientMacroTests
tests:
name: Run tests on ${{ matrix.platform }}
runs-on: macOS-latest
strategy:
matrix:
include:
- platform: macOS
build: swift build --target StoryblokClientTests
test: swift test --filter StoryblokClientTests
- platform: iOS
build: xcodebuild build -scheme StoryblokClientTests -destination 'platform=iOS Simulator,name=iPhone 17'
test: xcodebuild test -scheme StoryblokClientTests -destination 'platform=iOS Simulator,name=iPhone 17'
- platform: watchOS
build: xcodebuild build -scheme StoryblokClientTests -destination 'platform=watchOS Simulator,name=Apple Watch SE 3 (40mm)'
test: xcodebuild test -scheme StoryblokClientTests -destination 'platform=watchOS Simulator,name=Apple Watch SE 3 (40mm)'
- platform: tvOS
build: xcodebuild build -scheme StoryblokClientTests -destination 'platform=tvOS Simulator,name=Apple TV'
test: xcodebuild test -scheme StoryblokClientTests -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: Disable swift-syntax prebuilts
run: defaults write com.apple.dt.Xcode IDEPackageEnablePrebuilts -bool NO
- name: Build
run: ${{ matrix.build }}
- name: Run tests on ${{ matrix.platform }}
run: ${{ matrix.test }}