diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a473f7c..0d345fb9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,8 +24,10 @@ 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 @@ -33,9 +35,7 @@ jobs: strategy: matrix: os: [ubuntu-18.04, ubuntu-20.04] - runs-on: ${{ matrix.os }} - steps: - uses: actions/checkout@v3 - name: Run tests diff --git a/Makefile b/Makefile index 836b33ff..a882049d 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ CONFIG = debug default: test -test: +build-all-platforms: for platform in \ "$(PLATFORM_IOS)" \ "$(PLATFORM_MACOS)" \ @@ -16,7 +16,7 @@ test: "$(PLATFORM_TVOS)" \ "$(PLATFORM_WATCHOS)"; \ do \ - xcodebuild test \ + xcodebuild build \ -workspace Dependencies.xcworkspace \ -scheme Dependencies \ -configuration $(CONFIG) \ diff --git a/Tests/DependenciesTests/DependencyTests.swift b/Tests/DependenciesTests/DependencyTests.swift index 20d5f57f..2bbcae60 100644 --- a/Tests/DependenciesTests/DependencyTests.swift +++ b/Tests/DependenciesTests/DependencyTests.swift @@ -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