This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from codecov/master
Pull from codecov master
- Loading branch information
Showing
6 changed files
with
81 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
var detect = require("../lib/detect"); | ||
var execSync = require('child_process').execSync; | ||
if (!execSync) { | ||
var exec = require('execSync').exec; | ||
var execSync = function(cmd){ | ||
return exec(cmd).stdout; | ||
}; | ||
} | ||
|
||
describe("Codecov", function(){ | ||
|
||
it("can detect existing appveyor service", function(){ | ||
process.env.TRAVIS = "true"; | ||
|
||
expect(detect().service).to.eql("travis"); | ||
|
||
process.env.TRAVIS = ""; | ||
}); | ||
|
||
it("can select local git service if no service is found", function(){ | ||
expect(detect().commit).to.match(/^\w{40}$/); | ||
expect(detect().commit).to.eql(execSync("git rev-parse HEAD || hg id -i --debug | tr -d '+'").toString().trim()); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
var buildkite = require("../../lib/services/buildkite"); | ||
|
||
describe("Buildkite CI Provider", function(){ | ||
|
||
it ("can detect buildkite", function(){ | ||
process.env.BUILDKITE = "true"; | ||
expect(buildkite.detect()).to.be(true); | ||
}); | ||
|
||
it ("can get buildkite env info", function(){ | ||
process.env.BUILDKITE_BUILD_NUMBER = "1"; | ||
process.env.BUILDKITE_BUILD_URL = "url"; | ||
process.env.BUILDKITE_COMMIT = "commit"; | ||
process.env.BUILDKITE_BRANCH = "branch"; | ||
process.env.BUILDKITE_PROJECT_SLUG = "slug"; | ||
|
||
expect(buildkite.configuration()).to.eql({ | ||
service : 'buildkite', | ||
build : "1", | ||
build_url : "url", | ||
commit : "commit", | ||
branch : "branch", | ||
slug : "slug" | ||
}); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters