Skip to content
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ jobs:
- uses: actions/checkout@v3
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run ${{ matrix.config }} tests
run: CONFIG=${{ matrix.config }} make test
- name: Run tests
run: make test-swift
- name: Build platforms ${{ matrix.config }}
run: CONFIG=${{ matrix.config }} make build-all-platforms
- name: Build for library evolution
run: make build-for-library-evolution

ubuntu-tests:
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Run tests
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ CONFIG = debug

default: test

test:
build-all-platforms:
for platform in \
"$(PLATFORM_IOS)" \
"$(PLATFORM_MACOS)" \
"$(PLATFORM_MAC_CATALYST)" \
"$(PLATFORM_TVOS)" \
"$(PLATFORM_WATCHOS)"; \
do \
xcodebuild test \
xcodebuild build \
-workspace Dependencies.xcworkspace \
-scheme Dependencies \
-configuration $(CONFIG) \
Expand Down
15 changes: 0 additions & 15 deletions Tests/DependenciesTests/DependencyTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,21 +171,6 @@ final class DependencyTests: XCTestCase {
XCTAssertEqual(9000, greatGrandchild.int)
XCTAssertEqual("cool", greatGrandchild.string)
}

func testInvalidScope_Async() async {
#if DEBUG && !os(Linux)
await withDependencies(from: self) {
await Task.yield()
}
XCTExpectFailure {
$0.compactDescription == """
You are trying to propagate dependencies to a child model from a model with no \
dependencies. To fix this, the given 'DependencyTests' must be returned from another \
'withDependencies' closure, or the class must hold at least one '@Dependency' property.
"""
}
#endif
}
}
private class Model {
@Dependency(\.int) var int
Expand Down