Skip to content

chore: fix CI code coverage publishing #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2020

Conversation

lance
Copy link
Member

@lance lance commented Apr 29, 2020

The code coverage publishing in package.json works fine on non-ubuntu systems.
However, in Ubuntu /bin/sh is symlinked to /bin/dash which doesn't support
everything supported by /bin/bash - specifically -o pipefail.

This commit changes the code coverage script to explicitly use bash instead.

Signed-off-by: Lance Ball [email protected]

The code coverage publishing in package.json works fine on non-ubuntu systems.
However, in Ubuntu `/bin/sh` is symlinked to `/bin/dash` which doesn't support
everything supported by `/bin/bash` - specifically `-o pipefail`.

This commit changes the code coverage script to explicitly use `bash` instead.

Signed-off-by: Lance Ball <[email protected]>
@lance lance force-pushed the fix-codacy-publish branch from d0802eb to 9896f08 Compare April 29, 2020 12:58
@lance
Copy link
Member Author

lance commented Apr 29, 2020

@fabiojose I think this should fix it. Without Travis and Codacy credentials for this repository, I can't test in advance. We shall see :)

@lance
Copy link
Member Author

lance commented Apr 29, 2020

Note: coverage results are only published when a commit lands on master. For pull requests, the tests are run but coverage is not published. I wonder if this issue we are facing might indicate that not publishing coverage results on PRs is a problem. In fact, I can see how it would be desirable to publish code coverage reports for pull requests because you don't want coverage to go down with a PR but you can't know that it will or not until after the merge.

@lance
Copy link
Member Author

lance commented Apr 29, 2020

FYI - in Codacy, it is possible to have the quality check fail if code coverage is reduced. Might be a good idea to do that.

@lance lance mentioned this pull request Apr 29, 2020
@lance lance merged commit 8fb0ddf into cloudevents:master Apr 29, 2020
@lance lance deleted the fix-codacy-publish branch April 29, 2020 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants