Skip to content

Commit

Permalink
Merge pull request #114 from DominikBucher12/fix/previews
Browse files Browse the repository at this point in the history
Fix GitHub Actions not supporting latest macOS SDK and runner
  • Loading branch information
danielsaidi authored Jan 15, 2024
2 parents e354836 + 29f8138 commit 2a20a94
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 10 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ jobs:
swift-version: "5.8"
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v
xcode-version: '15.1.0'
- name: Build iOS
run: xcodebuild -project Demo/Demo.xcodeproj build -sdk iphoneos -scheme 'RichTextKit'
- name: Test iOS
run: xcodebuild -project Demo/Demo.xcodeproj test -sdk iphoneos -scheme 'RichTextKitTests' -destination 'platform=iOS Simulator,name=iPhone 15 Pro,OS=17.2' -enableCodeCoverage YES


Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1520"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "RichTextKitTests"
BuildableName = "RichTextKitTests"
BlueprintName = "RichTextKitTests"
ReferencedContainer = "container:..">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
10 changes: 5 additions & 5 deletions Sources/RichTextKit/Colors/RichTextColorPicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,8 @@ private struct ColorButtonStyle: ButtonStyle {
}
}

#Preview {

struct Preview: View {

struct RichTextColorPicker_Previews: PreviewProvider {
private struct RichTextColorPickerPreview: View {
@State
private var foregroundColor = Color.black

Expand Down Expand Up @@ -187,5 +185,7 @@ private struct ColorButtonStyle: ButtonStyle {
}
}

return Preview()
static var previews: some View {
RichTextColorPickerPreview()
}
}

0 comments on commit 2a20a94

Please sign in to comment.