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

Make sure to enable check_line_num only when Github Workflow. #210

Closed

Conversation

ono-max
Copy link
Collaborator

@ono-max ono-max commented Aug 1, 2021

As #209 (comment), we need the option for disabling check_line_num! method. I added the environment variable in utils.rb and ruby.yml to make check_line_num! valid only when Github Workflow.

Of course, we can also enable it in local environment by adding environment variable such as

$ RUBY_DEBUG_TEST_CHECK_LINE_NUM=true rake test

@ono-max ono-max changed the title foo Make sure to enable check_line_num only when Github Workflow. Aug 1, 2021
@ono-max ono-max force-pushed the check-line-number-on-GH-workflow branch from bd04160 to 5334c31 Compare August 1, 2021 23:50
@ono-max ono-max marked this pull request as ready for review August 1, 2021 23:59
@ono-max
Copy link
Collaborator Author

ono-max commented Aug 2, 2021

@st0012

I hope this PR will solve your problem :)

@st0012
Copy link
Member

st0012 commented Aug 2, 2021

@ono-max thank you for the PR!
but this doesn't solve my problem. I still want the line number check to run because I rely on it to generate line-numbered program script.
I'll open a PR to propose another change 🙂

@ono-max
Copy link
Collaborator Author

ono-max commented Aug 2, 2021

@st0012

but this doesn't solve my problem. I still want the line number check to run because I rely on it to generate line-numbered program script.

It doesn't make sense to me. You can run check_line_num! method as follows.

$ RUBY_DEBUG_TEST_CHECK_LINE_NUM=true rake test

@st0012
Copy link
Member

st0012 commented Aug 2, 2021

I'd like to avoid running tests with another env var when possible. The behavior I'm looking for is simple:

  1. Verify test result
  2. If 1 passed, verify line numbers

With the correct verification order, it's done automatically by the test framework (like it used to do).

But now it only does 1 locally and I have to perform 2 manually.

I added #211 to demonstrate the change.

@ono-max
Copy link
Collaborator Author

ono-max commented Aug 2, 2021

Thank you for giving me much detailed information. There are some stuff I would like to confirm with you.

  • The reason why you don't wanna avoid env var is not automatic?(You'd like to check without anything)
  • When users created a PR, they can check the log on Github Workflow and they can copy and paste line number from it.
    • Doesn't this solve your problem?

@st0012
Copy link
Member

st0012 commented Aug 2, 2021

The reason why you don't wanna avoid env var is not automatic?(You'd like to check without anything)

Yes, it should be automatic because it "was" automatic.

When users created a PR, they can check the log on Github Workflow and they can copy and paste line number from it.

Don't you think it's weird that users have to rely on CI to finish their test case? Especially for something that could've been done locally.

@ono-max
Copy link
Collaborator Author

ono-max commented Aug 2, 2021

Ok, I am convinced with your opinion. I close my PR.

@ono-max ono-max closed this Aug 2, 2021
@ono-max ono-max deleted the check-line-number-on-GH-workflow branch August 2, 2021 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants