reviewdog / action-rubocop

Run rubocop with reviewdog 🐶
MIT License
114 stars 75 forks source link

Add integration tests: add a sample code and run this action with GitHub Actions #33

Open haya14busa opened 3 years ago

haya14busa commented 3 years ago

We should add tests to avoid this (#31) kind of failure before merging it similar to https://github.com/reviewdog/action-template and other actions.

@mgrachev Can you work on it?

mgrachev commented 3 years ago

Great idea 👍

javierjulio commented 7 months ago

@haya14busa I'll try to do this as I would like to have tests too. In reference to #31, I think we should focus support on the bundler approach as the main way to use this action. I take it you want to see the test workflow from https://github.com/reviewdog/action-template implemented here? Are the jobs there just happy path tests, meaning the action-rubocop would run but report no warnings? If so, I should be able to do that.

haya14busa commented 7 months ago

Sorry for the late response. Thanks, I appreciate your work ♥

We actually want to have a bad path test. We can create a test dir and put a bad code intentionally , and check (manually) comments will be posted and optimally check the exit code is expected.

javierjulio commented 6 months ago

@haya14busa no worries. You're welcome. Happy to help where I can. Do we have another reviewdog action with bad path tests or something similar? I figure we may have something and I can use that as a basis for this.

haya14busa commented 6 months ago

You can refer to https://github.com/reviewdog/action-template. They aren't exit code check, but I don't remember any good test code. We should add a test of exit code to the template directory ideally.

javierjulio commented 6 months ago

I think I found some candidates in action-tfsec and action-trivy tests workflows so I'll use that as a basis for this.