Commit Graph

163 Commits

Author SHA1 Message Date
Rafael Mendonça França 00d46bb012
✂️ 2021-10-14 16:36:56 +00:00
sabulikia 0c9f35a1a4 Fix Selenium deprecation warnings in CI. 2021-10-14 12:03:42 -04:00
Ryuta Kamizono a206aecedf chore: Use `e.g.` which is the more used spelling
```
% git grep -i '\be\.g\.' | wc -l
290
```
2021-07-21 09:17:54 +09:00
Zachary Scott cc22507fbf Split out TestRun from ci/qunit-selenium-runner to separate file
This makes it easy to separate code that is not ours and include the
license at the top and document it's origin on the class.
2021-06-25 12:56:43 +09:00
Alex Ghiculescu 895a78de2c
add full license 2021-06-23 13:33:34 -05:00
Alex Ghiculescu 2934c54dfd Output UJs test failures in CI 2021-06-17 16:51:37 -05:00
Yasuo Honda ff10ac5fcb Remove .travis.yml and ci/travis.rb
Rails CI has been running at Buildkite for 9 month.
Refer e485c14a3e
2020-01-02 09:27:53 +09:00
Guillermo Iguaran 2512f24ef4 Use webdrivers instead of chromedriver-helper for AV UJS tests 2019-03-24 16:05:30 -05:00
Matthew Draper 287920ca7d Respect ENV variables when finding DBs etc for the test suite
If they're not set we'll still fall back to localhost, but this makes it
possible to run the tests against a remote Postgres / Redis / whatever.
2019-02-06 01:20:06 +10:30
George Claghorn 0decd2ddc4 Import Action Text 2019-01-04 22:22:49 -05:00
Ryuta Kamizono 50d9c06b01 Only run isolated tests on the latest stable ruby: that's now 2.6
Follow up #34795.

See also f1a30d8ad5.
2018-12-27 19:05:41 +09:00
George Claghorn a5b2fff64c Import Action Mailbox 2018-12-25 21:32:35 -05:00
Yasuo Honda 67c8001459 Use the same option for create database statements between Raketask and travis.rb 2018-09-26 03:18:56 +00:00
yuuji.yaginuma 8059c77404 Load `chromedriver-helper.rb`
The bin shim provides by `chromedriver-helper` gem has renamed to
`chromedriver-helper` since 2.0.
https://github.com/flavorjones/chromedriver-helper/pull/58

Since bin of new name is set to driver path in
`lib/chromedriver-helper.rb`, need to load it.
2018-09-16 09:40:17 +09:00
Koichi ITO 211b10aea6 Bump RuboCop to 0.58.2
## Summary

RuboCop 0.58.2 was released.
https://github.com/rubocop-hq/rubocop/releases/tag/v0.58.2

And rubocop-0-58 channel is available in Code Climate.
https://github.com/codeclimate/codeclimate/releases/tag/v0.76.0
https://github.com/codeclimate/codeclimate/commit/38f21f0

In addition, the following changes are made in this PR.

- Replace Custom cops with Rails cops
- Add jaro_winkler gem to Gemfile.lock

### Replace Custom cops with Rails cops

These are compatible replacements.

- Replace `CustomCops/AssertNot` cop with `Rails/AssertNot` cop.
- Replace `CustomCops/RefuteNot` cop with `Rails/RefuteMethods` cop.

With this replacement, it was decided to use cop of RuboCop itself.
It removes the code related to CustomCops accordingly.

### Add jaro_winkler gem to Gemfile.lock

Since RuboCop 0.57.0 depends on jaro_winkler gem,
it has been added to Gemfile.lock.
2018-07-26 17:48:07 +09:00
Ryuta Kamizono 1dc17e7b2e Fix `CustomCops/AssertNot` to allow it to have failure message
Follow up of #32605.
2018-05-13 11:32:47 +09:00
Daniel Colson 087e0ccb72 Add RuboCop for `assert_not` over `assert !`
We added `assert_not` in f75addd "to replace warty 'assert !foo'".
fa8d35b agrees that it is warty, and so do I. This custom Rubocop rule
turns the wart into a violation.

As with my last custom cop, https://github.com/rails/rails/pull/32441,
I want to make sure this looks right on code climate before pushing
another commit to autocorrect everything.

@toshimaru I just noticed
https://github.com/toshimaru/rubocop-rails/pull/26
Is there a better way to add these custom cops, or were you saying we
shouldn't have custom cops at all?
2018-04-19 08:11:28 -04:00
Daniel Colson f88f5a457c Add custom RuboCop for `assert_not` over `refute`
Since at least cf4afc4 we have preferred `assert_not` methods over
`refute` methods. I have seen plenty of comments in PRs about this,
and we have tried to fix it a few times (5294ad8, e45f176, 8910f12,
41f50be, d4cfd54, 48a183e, and 211adb4), but the `refute` methods
keep sneaking back in.

This custom RuboCop will take care of enforcing this preference, so we
don't have to think about it again. I suspect there are other similar
stylistic preferences that could be solved with some custom RuboCops, so
I will definitely keep my eyes open. `assert_not` over `assert !` might
be a good candidate, for example.

I wasn't totally sure if `ci/custom_cops` was the best place to put
this, but nothing else seemed quite right. At one point I had it set up
as a gem, but I think custom cops like this would have limited value
in another context.

I want to see how code climate handles the new cops before
autocorrecting the existing violations. If things go as expected, I will
push another commit with those corrections.
2018-04-03 22:35:34 -04:00
Matthew Draper f1a30d8ad5 Only run isolated tests on the latest stable ruby: that's now 2.5 2018-01-25 09:55:10 +10:30
eileencodes 93d7b07549 Fix ActionView UJS build
The UJS build has been failing with Chrome failed to start. This commit
fixes it by adding the option `--no-sandbox`. Travis removed the sanbox
option which is why Chrome crashes.

Ref https://github.com/travis-ci/travis-ci/issues/8836

Example failure: https://travis-ci.org/rails/rails/jobs/330396750
2018-01-18 11:28:12 -05:00
Fatos Morina 37cf9b3466 Fix typos and add a few suggestions 2017-11-28 19:27:43 +01:00
Matthew Draper f50aeba01e Keep rubocop happy with the new Selenium runner 2017-10-28 22:44:06 +10:30
Guillermo Iguaran 734f981782 Count assertions instead of tests in report 2017-10-19 11:11:20 -05:00
Guillermo Iguaran 4dcf12a340 PhantomJS is abandoned, replace it with Selenium/Chrome headless 2017-10-19 11:01:52 -05:00
Koichi ITO 0ea00bb5b0 Use frozen string literal in ci/ 2017-08-13 22:07:54 +09:00
George Claghorn e43ba973a3 Run Active Storage tests in CI (#30144) 2017-08-10 15:58:30 -04:00
Kazuhiro NISHIYAMA 7f89d4e8bf Use File::NULL instead of "/dev/null" 2017-07-31 21:58:42 +09:00
Ryuta Kamizono 249a982a25 Create `rails@localhost` user on travis ci
Looks like that latest CI failure is due to missing `rails@localhost`.
Creating the user may solve the issue.

https://travis-ci.org/rails/rails/jobs/254996063#L831
2017-07-19 10:18:00 +09:00
Matthew Draper 87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Matthew Draper 22deb92216 Skip isolated test runs on older rubies 2017-03-23 03:51:03 +10:30
Rafael Mendonça França fe4a5706ac
Test rails-ujs in our travis matrix 2017-02-22 13:49:28 -05:00
eileencodes 1a0ca84a06 Move and rename system tests
* Move system tests back into Action Pack
* Rename `ActionSystemTest` to `ActionDispatch::SystemTestCase`
* Remove private base module and only make file for public
`SystemTestCase` class, name private module `SystemTesting`
* Rename `ActionSystemTestCase` to `ApplicationSystemTestCase`
* Update corresponding documentation and guides
* Delete old `ActionSystemTest` files
2017-02-20 15:07:35 -05:00
eileencodes 5bf0aa6745 Turn system testing into it's own gem and rename
Renames `Rails::SystemTestCase` to `ActionSystemTest` and moves it to a
gem under the Rails name.

We need to name the class `ActionSystemTestCase` because the gem expects
a module but tests themselves expect a class.

Adds MIT-LICENSE, CHANGELOG, and README for the future.
2017-02-20 15:07:33 -05:00
Rafael Mendonça França fe1f4b2ad5
Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
Xavier Noria 80e66cc4d9 normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
Xavier Noria 60b67d76dc modernizes hash syntax in the rest of the project 2016-08-06 19:40:54 +02:00
Xavier Noria 8b4e6bf233 applies new string literal convention in ci
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:21:29 +02:00
Jon Moss 8cfce058d9
CI: run Action Cable browser tests in Sauce Labs
Allow failures until test runs are consistently stable, not hanging.

Closes #24943.

Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
2016-05-25 09:21:28 -07:00
Anubhav Saxena 41c685608b Minor comment language correction. 2016-05-24 22:42:49 +05:30
Joe Rafaniello d2660c8cad Fix some typos in comments.
[ci skip]
2016-05-04 12:22:23 -04:00
Ryuta Kamizono 210c81440a Remove commented out code in `ci/travis.rb` [ci skip] 2016-02-04 09:15:25 +09:00
yui-knk bf8ca88b91 Use an appropriate rebuild task on Travis
Use `db:mysql:rebuild` when testing mysql2,
`db:postgresql:rebuild` when testing postgresql
and no rebuild task when testing others.
2015-12-22 00:55:13 +09:00
Rafael Mendonça França f1ba5869ca Do not run action cable tests in isolation
We don't have isolation tests for it yet.
2015-12-14 16:02:31 -02:00
Rafael Mendonça França a0e4d5e335 Add Action Cable tests to travis matrix 2015-12-14 14:44:51 -02:00
Godfrey Chan 9d7d12c004 Partially revert 14b20ce
The failure have returned, so disabling the tests again. (The upgrade is
fine to keep.)
2015-11-27 01:32:38 -08:00
Godfrey Chan 14b20ce9b3 Upgrade to listen 3.0.5, re-enable tests
In listen 3.0.4 and below, the `#stop` method on the notification
backends are a no-op, meaning that we are leaking them per test. This
ended up triggering another bug in Ruby that causes our builds to fail
randomly on CI.

listen bug: https://github.com/guard/listen/issues/353
ruby bug: https://bugs.ruby-lang.org/issues/11744
2015-11-26 10:35:20 -08:00
Godfrey Chan 71ffd9b521 Only run listen tests in isolation, for now
There is a known issue with the listen tests that casuses files to be
incorrectly GC'ed even when they are still in-use. The current is to
only run them in isolation to avoid randomly failing our test suite.
2015-11-26 02:52:00 -08:00
Roque Pinel 89550bc1a0 Add the bug report templates to the Travis CI build
The bug report templates are now executed from the `ci/travis.rb` when
`GEM` contains `guides`.

I started by creating a `test` task in `guides/Rakefile` to handle this,
but since inline `gemfile` must not be executed with `bundle exec`, that
rake task would not be consistent with others. So I went back by
executing them directly from `Build`.

Use inline Gemfile dependency when reporting gem bugs
2015-06-05 15:29:48 -05:00
Erik Michaels-Ober d1374f99bf Pass symbol as an argument instead of a block 2014-11-29 11:53:24 +01:00