Skip to content

Commit

Permalink
tests: TestCodegenConfigurations projects should fail on warnings (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
calvincestari authored and gh-action-runner committed Dec 13, 2023
1 parent 8913a31 commit 143d149
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ let package = Package(
name: "TestApp",
dependencies: [
.product(name: "ApolloAPI", package: "apollo-ios")
],
swiftSettings: [
.unsafeFlags(["-warnings-as-errors"])
]),
.testTarget(
name: "TestAppTests",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

swift test
swift test -Xswiftc -warnings-as-errors
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ let package = Package(
"graphql/PetDetails.graphql",
"graphql/AllAnimalsIncludeSkipQuery.graphql",
"graphql/PetAdoptionMutation.graphql"
],
swiftSettings: [
.unsafeFlags(["-warnings-as-errors"])
]),
.testTarget(
name: "PackageOneTests",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ let package = Package(
name: "PackageTwo",
dependencies: [
.product(name: "ApolloAPI", package: "apollo-ios"),
],
swiftSettings: [
.unsafeFlags(["-warnings-as-errors"])
]),
.target(
name: "TestMocks",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash
set -e

echo "Testing PackageOne.."
cd PackageOne
swift test
swift test -Xswiftc -warnings-as-errors

echo "Testing PackageTwo.."
cd ../PackageTwo
swift test
swift test -Xswiftc -warnings-as-errors
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ let package = Package(
dependencies: [
.product(name: "Apollo", package: "apollo-ios"),
.product(name: "AnimalKingdomAPI", package: "AnimalKingdomAPI")
],
swiftSettings: [
.unsafeFlags(["-warnings-as-errors"])
]
),
.testTarget(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

swift test
swift test -Xswiftc -warnings-as-errors
1 change: 0 additions & 1 deletion apollo-ios/Sources/ApolloAPI/DataDict.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public struct DataDict: Hashable {
_storage.deferredFragments
}

#warning("TODO, remove deferredFragments default value when we set these up in executor")
public init(
data: [String: AnyHashable],
fulfilledFragments: Set<ObjectIdentifier>,
Expand Down

0 comments on commit 143d149

Please sign in to comment.