public void ShouldDetectAppveyorPullRequest() { SetEnvironmentVariables(("APPVEYOR", "true"), ("APPVEYOR_PULL_REQUEST_NUMBER", "42")); var isPr = DetectCI.IsPullRequest(); Assert.True(isPr); }
public void ShouldDetectCircleCi() { SetEnvironmentVariables(("CIRCLECI", "true")); var ci = DetectCI.IsCI(); Assert.True(ci); var vendor = DetectCI.GetCIVendor(); Assert.Equal("CIRCLE", vendor.Constant); var isPr = DetectCI.IsPullRequest(); Assert.False(isPr); }
public void ShouldDetectBuildkitPullRequest() { SetEnvironmentVariables(("BUILDKITE", "true"), ("BUILDKITE_PULL_REQUEST", "42")); var ci = DetectCI.IsCI(); Assert.True(ci); var vendor = DetectCI.GetCIVendor(); Assert.Equal("BUILDKITE", vendor.Constant); var isPr = DetectCI.IsPullRequest(); Assert.True(isPr); }
public void ShouldDetectShippablePullRequest() { SetEnvironmentVariables(("SHIPPABLE", "true"), ("IS_PULL_REQUEST", "true")); var ci = DetectCI.IsCI(); Assert.True(ci); var vendor = DetectCI.GetCIVendor(); Assert.Equal("SHIPPABLE", vendor.Constant); var isPr = DetectCI.IsPullRequest(); Assert.True(isPr); }
public void ShouldDetectSemaphorePullRequest() { SetEnvironmentVariables(("SEMAPHORE", "true"), ("PULL_REQUEST_NUMBER", "42")); var ci = DetectCI.IsCI(); Assert.True(ci); var vendor = DetectCI.GetCIVendor(); Assert.Equal("SEMAPHORE", vendor.Constant); var isPr = DetectCI.IsPullRequest(); Assert.True(isPr); }
public void ShouldDetectCirrusCiPullRequest() { SetEnvironmentVariables(("CIRRUS_CI", "true"), ("CIRRUS_PR", "42")); var ci = DetectCI.IsCI(); Assert.True(ci); var vendor = DetectCI.GetCIVendor(); Assert.Equal("CIRRUS", vendor.Constant); var isPr = DetectCI.IsPullRequest(); Assert.True(isPr); }
public void ShouldDetectAppveyor() { SetEnvironmentVariables(("APPVEYOR", "true")); var ci = DetectCI.IsCI(); Assert.True(ci); var vendor = GetCIVendor(); Assert.Equal("APPVEYOR", vendor.Constant); var isPr = IsPullRequest(); Assert.False(isPr); }