-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add .travis.yml #28
Add .travis.yml #28
Conversation
The tests now run via PostgreSQL but they fail. It seems many tests are run with database models although they are only added for SQLite? |
Changed it to SQLite, in case the tests then work. |
Basically there are different tests for the transactional systems under test. You can see that at work in Said another way, we could probably strip out all the database-specific pieces now because they were valuable 4 or 5y ago but now are probably just getting in the way. |
I think I get what you're saying, but I don't yet quite grasp what is going on in I guess the |
It basically is the test that will connect to mysql/postgres to make sure data is not being persisted in the case of exception during archive/unarchive. I don't think we need to be specific any more as regards the db engine. For the purposes of this gem's functioning, mysql, postgres, and sqlite have feature parity around transactions because we are not using checkpoints or sub-transactions. So… yeah, we can probably just nuke anything that deals with mysql or postgres, including all the setup junk. |
ANd yeah, #29 is not necessary if we no longer connect to mysql or pg at all. :D |
I tried a bunch of stuff to get the mysql bits to run correctly. There is apparently a big snafu around mysql on travis you can see at travis-ci/travis-ci#6842 I think removing mysql and postgresql will probably be best, despite making it slightly harder to write tests for regressions in the future, should they arise. |
I ran into the same issues with MySQL on Travis. I removed all MySQL and PostgreSQL code and am starting to see the first successful test runs on Travis. I'll have a look what makes the other ones fail. |
A green test run! How do you like the approach so far? |
Btw, I'd love to add the Rails 5.1 beta, but allowing it to fail if you're ok with that. Other TODOs include changing the README and adapting the CHANGELOG. Also, I'd love to add RuboCop with a few selected rules, like forcing Ruby 1.9 hash syntax etc. But in another PR. |
test/test_helper.rb
Outdated
@@ -40,7 +40,7 @@ def setup_database_cleaner | |||
|
|||
def create_test_tables | |||
schema_file = File.dirname(__FILE__) + "/schema.rb" | |||
["pg", "mysql", "sqlite"].each do |db| | |||
["sqlite"].each do |db| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably doesn't need to be inside an each
block any more.
Seems correct. There are some instances of sqlite being mentioned specifically (in at least the transaction test), which is unneccessary.
👌 sounds fine
Not sure what you mean about the changelog. It probably doesn't need to change at all until a new version is cut. Even then there shouldn't be any changes to old entries aside from grammatical errors. Is that what you have in mind, or were you thinking something else? • • • What is up with this commit? c4f33ee 😁 |
Done.
You're right! I guess only the README has to be adapted that this gem is no longer being tested explicitly on PostgreSQL and MySQL?
Heh, I think it's because Ruby 2.4 has unified Fixnum and Binum into Integer which arel 5 (which I guess is what shipped with Rails 4.1) doesn't support. You can see a failed test run here. |
Hmm, I'm not sure why Travis suddenly can't find Ruby 2.4 anymore in some cases. That's the one thing that used to work, haha. |
I found travis-ci/travis-ci#7077 and will add the minor versions as well to see if this clears things up. Btw, sorry for the many messages, but one more thing. Do you want me to clean up the commits (squash a few of them together) or are you just gonna squash them all into one using GitHub's Squash+Merge? |
If you prefer that. It's your PR. I don't normally squash because I prefer the full history. Just let me know when you are done. I think this is 👍 |
I'm done. I'm just waiting for another successful test run and it's ready to be merged from my point of view. Thanks for all the support! |
👍 you are very welcome. Thanks for getting this green! I added you to the contributor list. If you would like to not be there, let me know. |
Released 1.2.0 today. Thanks again for all the help and the push to clean things up! |
You're welcome! Thanks for the fast feedback loops.
…On Sun, Mar 19, 2017, 17:17 janxious ***@***.***> wrote:
@aried3r <https://github.com/aried3r>
It probably doesn't need to change at all until a new version is cut
Released 1.2.0 today. Thanks again for all the help and the push to clean
things up!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#28 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABPaoL-67Tt9IX4vKnQHnHohofNVWxyQks5rnVUPgaJpZM4McdBu>
.
|
This probably won't work out of the box, but should be a good starting point.
Gemfiles/Ruby combinations seem to work: