-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (74 loc) · 2.92 KB
/
Copy pathStoryblokClient.yml
File metadata and controls
78 lines (74 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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 }}