Skip to content

Commit

Permalink
Enable conditional execution of integration tests
Browse files Browse the repository at this point in the history
# Conflicts:
#	Package.swift
  • Loading branch information
aashishpatil-g committed Sep 19, 2024
1 parent 0176c77 commit 30046d3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ let package = Package(
.testTarget(
name: "FirebaseDataConnectIntegration",
dependencies: ["FirebaseDataConnect"],
path: "Tests/Integration",
path: integrationTestPath(),
exclude: ["Gen/KitchenSink/Package.swift"],
resources: [
.copy("Resources/fdc-kitchensink"),
Expand All @@ -76,3 +76,12 @@ func firebaseDependency() -> Package.Dependency {

return .package(url: firebaseURL, exact: "11.3.0")
}

func integrationTestPath() -> String? {
// Set this env variable to disable integration tests being run as part of CI
if ProcessInfo.processInfo.environment["DISABLE_INTEGRATION_TESTS"] != nil {
return "Tests/NoIntegration"
} else {
return "Tests/Integration"
}
}
17 changes: 17 additions & 0 deletions Tests/NoIntegration/Readme
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.



This is an empty folder temporarily created till we enable Integration tests in git.

0 comments on commit 30046d3

Please sign in to comment.