Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shendy/swift6 upgrade dependencies #7

Merged
merged 4 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 12 additions & 15 deletions .github/workflows/macOS.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift

name: macOS

on:
push:
branches: ["**"]
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: macos-13

runs-on: macos-latest
steps:
- uses: swift-actions/setup-swift@v1
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: actions/checkout@v3
- name: Build for release
run: swift build -v -c release
- name: Test
run: swift test -v
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 16.0
- uses: actions/checkout@v3
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let package = Package(
)
],
dependencies: [
.package(url: "https://github.com/0xLeif/AppState.git", from: "1.0.0")
.package(url: "https://github.com/0xLeif/AppState.git", from: "2.0.0")
],
targets: [
.target(
Expand Down
1 change: 1 addition & 0 deletions Sources/FeedbackKit/FeedbackStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Cache
import Foundation

extension Application {
@MainActor
fileprivate var storedFeedback: FileState<[UUID: Feedback]> {
fileState(initial: [:], filename: "storedFeedback")
}
Expand Down
1 change: 1 addition & 0 deletions Sources/FeedbackKit/FeedbackViewModel.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Combine
import SwiftUI

@MainActor
class FeedbackViewModel: ObservableObject {
private var bag: Set<AnyCancellable>

Expand Down
12 changes: 11 additions & 1 deletion Tests/FeedbackKitTests/FeedbackKitTests.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
import XCTest
@testable import FeedbackKit

@MainActor
final class FeedbackKitTests: XCTestCase {
func testExample() throws {
let store = FeedbackStore()


let feedback = Feedback(type: .comment, title: "Cool", description: "Feedback", state: .open)

store.set(feedback: feedback)

let storedFeedback = try XCTUnwrap(store.get(id: feedback.id))

XCTAssertEqual(storedFeedback.type, storedFeedback.type)
XCTAssertEqual(storedFeedback.title, storedFeedback.title)
XCTAssertEqual(storedFeedback.description, storedFeedback.description)
XCTAssertEqual(storedFeedback.state, storedFeedback.state)
}
}
Loading