Skip to content

Commit

Permalink
pass flag_name to API post JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
nickmerwin committed Apr 21, 2020
1 parent aaff7f8 commit 2f2426b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/convertLcovToCoveralls.js
Expand Up @@ -99,6 +99,9 @@ const convertLcovToCoveralls = (input, options, cb) => {
if (options.parallel) {
postJson.parallel = options.parallel;
}
if (options.flag_name) {
postJson.flag_name = options.flag_name;
}
parsed.forEach(file => {
file.file = cleanFilePath(file.file);
const currentFilePath = path.resolve(filepath, file.file);
Expand Down
2 changes: 2 additions & 0 deletions test/convertLcovToCoveralls.js
Expand Up @@ -34,6 +34,7 @@ describe('convertLcovToCoveralls', () => {
process.env.COVERALLS_REPO_TOKEN = 'REPO_TOKEN';
process.env.CI_PULL_REQUEST = 'https://github.com/fake/fake/pulls/123';
process.env.COVERALLS_PARALLEL = 'true';
process.env.COVERALLS_FLAG_NAME = 'FLAG_NAME';

getOptions((err, options) => {
const lcovpath = path.join(__dirname, '/../fixtures/onefile.lcov');
Expand All @@ -49,6 +50,7 @@ describe('convertLcovToCoveralls', () => {
output.service_job_id.should.equal('SERVICE_JOB_ID');
output.service_pull_request.should.equal('123');
output.parallel.should.equal(true);
output.flag_name.should.equal('FLAG_NAME');
//output.git.should.equal("GIT_HASH");
done();
});
Expand Down

0 comments on commit 2f2426b

Please sign in to comment.