I am using the same config here and it works fine 😕
Anyone know why travis is returning
No database selected here: https://travis-ci.org/silvercommerce/orders-admin/jobs/582787402
Recently had something similar but changed to
dist: trusty admittedly just as a copy from a working config so I can't say why it worked... but it did
uI recently had to change some configs to
dist: trusty as it seems the default has become
SS installer's travis config has recently been overhauled if you want a reference: https://github.com/silverstripe/silverstripe-installer/blob/4/.travis.yml
dist: xenial comes with services stripped out that were included by default in
trusty. Read about this here: https://blog.travis-ci.com/2019-04-15-xenial-default-build-environment :)
Xenial as the default Travis CI build environment is coming up next week, starting incrementally on Tuesday April 23rd, 2019. Since Ubuntu 14.04 reaches End of Life on April 30th, 2019, we’ll be g...Hide attachment content
@Scopey I did notice that framework uses
I have required Mysql/Postgres services. Will try switching to trusty in the morning.
There may be more though, depending on what you're doing. You can read a good write up from evaluation on this at https://github.com/silverstripe/silverstripe-framework/issues/9144
Description TravisCI switches to Ubuntu Xenial 16.04 as the default Travis CI build environment. That means CI setups on all our repositories without explicit dist and that are not dist: xenial may...Hide attachment content
dist: trusty sure is the easy way out though ;p
services is already defined in the config file I shared?
Just tried it with
dist: trusty (and some other settings copied from framework)
still the same error
do I need to provide environmental variables now or something...
another thing is that if your test class doesn't have a fixture file, or doesn't define
protected $usesDatabase = true and you try and do anything with a DB e.g.
$page->write() then it will throw that error too
Interesting, is that a fairly new thing?
Nope, that's always been the case :)
$useDatabase throw an error on my local environment as well?
All tests run fine on local
But fail with the
No database error when run on travis 😕
not necessarily, you have a .env file locally right? there isn't one in travis runs - it populates a few specific env vars for travis instead
Right, I will have a look though the code and see if there is anything obvious
Without an indication to set up a test database, your tests are probably running on your "production" (local env) database.
@nightjarnz Nope, they are creating a new test DB
but they might be using the connection details from .env
I guess if I remove my .env locally, I can see if that causes things to fail
like an "Archive" button suddenly appearing!
It can be, especially if you are trying to trace what is causing something to happen
It is a bit of a pain, I seem to have spent a lot of time recently disabling versioned gridfields! 😕
@sander_ha As far as I can tell it is, I think there is an extension in the
Versioned module that enables it
When a client rings you Monday morning to ask why the changes haven't been put live yet, when they were put live last Thursday...