Skip to content

Run non-exercise tests in CI #523

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
Dec 30, 2016

Conversation

tommyschaefer
Copy link
Contributor

@tommyschaefer tommyschaefer commented Dec 30, 2016

This PR adds rake test to the travis config to run non-exercise tests in CI as discussed in #519.

Resolves #519.

@Insti
Copy link
Contributor

Insti commented Dec 30, 2016

I think we need to first add some magic to not create test coverage files in Travis.

@Insti
Copy link
Contributor

Insti commented Dec 30, 2016

Is this something you can do @tommyschaefer ?

@tommyschaefer
Copy link
Contributor Author

From the Travis log:

$ rake test
Run options: --seed 21175

# Running:

...................

Fabulous run in 0.009044s, 2100.8717 runs/s, 2432.5883 assertions/s.

19 runs, 22 assertions, 0 failures, 0 errors, 0 skips


The command "rake test" exited with 0.

- Adds `rake test` to Travis config file
- Don't generate coverage data in CI
@Insti
Copy link
Contributor

Insti commented Dec 30, 2016

Clearly the answer was yes. ❤️

@tommyschaefer tommyschaefer force-pushed the add-rake-test-to-travis branch from cf474e3 to 75d2082 Compare December 30, 2016 17:54
@tommyschaefer tommyschaefer changed the title Test non-exercise tests in CI Run non-exercise tests in CI Dec 30, 2016
@Insti
Copy link
Contributor

Insti commented Dec 30, 2016

This is a separate issue that I noticed while looking through the Travis log:

Use assert_nil if expecting nil from /tmp/all-your-base.FzoC9cwNdy/all_your_base_test.rb:280:in `test_second_base_is_negative'. This will fail in MT6

Are these still the old tests? Is this an issue in the new ones?

@tommyschaefer
Copy link
Contributor Author

Are these still the old tests? Is this an issue in the new ones?

Yes, this is a warning from the old tests. The new tests generated in #510 don't have this issue.

The old tests use assert_equal nil, ... rather than assert_nil ... which causes the warnings, but the new tests never expect nil since it's actually an error case. Now we expect to raise an argument error.

@Insti
Copy link
Contributor

Insti commented Dec 30, 2016

FWIW: This is a situation where I would have recommended NOT squashing the commits, as adding the rake command to the travis config and altering the test_helper.rb are two separate actions.

It doesn't matter too much here, but it's perhaps a little lesson that squashing is not ALWAYS the thing to do.

@Insti Insti merged commit 0b11381 into exercism:master Dec 30, 2016
@tommyschaefer
Copy link
Contributor Author

Ah! Good point! Thank you for the feedback!

@kotp
Copy link
Member

kotp commented Dec 30, 2016

You can still separate them out, if you wanted to in this PR. But yes, no worries.

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.

3 participants