Skip to content
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

Fix: Run Undercover silently failing when running Danger in CI #454

Open
htoo-eain-lwin opened this issue Aug 3, 2023 · 1 comment
Open

Comments

@htoo-eain-lwin
Copy link
Contributor

htoo-eain-lwin commented Aug 3, 2023

Issue

It's only happening when the repo name includes -. It'll work if the repo name is single word or use _.
As you see, even tough it's showing the error, our Run Danger is still passing.

Screenshot 2023-08-03 at 16 15 28

I think this happens when undercover-report tries to find /lcov/google-crawler.lcov instead of /lcov/google_crawler.lcov

/home/runner/work/google-crawler/google-crawler/vendor/bundle/ruby/3.2.0/gems/undercover-0.4.6/lib/
undercover.rb:32:in `initialize': No such file or directory @ rb_sysopen - /home/runner/work/
google-crawler/google-crawler/coverage/lcov/google-crawler.lcov (Errno::ENOENT)
	from /home/runner/work/google-crawler/google-crawler/vendor/bundle/ruby/3.2.0/gems
	/undercover-0.4.6/lib/undercover.rb:32:in `open'
Screenshot 2023-08-03 at 16 21 20

But it's creating correctly lcov/google-crawler.lcov when try to run in local 😵
Screenshot 2023-08-03 at 16 32 27

Expected

Run bundle exec undercover-report -l /home/runner/work/google-crawler/google-crawler/coverage/lcov/google_crawler.lcov
##[debug]/usr/bin/bash -e /home/runner/work/_temp/ba524503-14d3-42fe-bd4b-8148a20b0d53.sh
✅ No reportable changes
Undercover finished in 0.015s

Steps to reproduce

  1. Create New project using our template, make sure to include - in the repo name and create pull request to main or develop with some changes.
  2. You can see the error under Run Danger > Run Undercover
@htoo-eain-lwin
Copy link
Contributor Author

For now, I can by pass via updating to the following in the test.yml

  - name: Run Undercover
    run: bundle exec undercover-report -l /home/runner/work/google-crawler/google-crawler/coverage/lcov/google_crawler.lcov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant