Closed chgibb closed 6 years ago
Thanks for this pull request, @chgibb!
As @nathansobo mentioned on https://github.com/atom/xray/issues/22, we are in the process of revising the architecture of xray and this may affect the way things get tested. We'll make sure to take a look at this once #46 lands on master. Thanks!
Now that we have merged #46, are you interested in adjusting this PR to the new reality?
Now we should be able to run all of our tests without Electron. This makes @maxbrunsfeld and I think that it would be better to target Travis's Rust environment. Then we should be able to run cargo test
in the root of the workspace. We also have a few tests in xray_electron
that can be run with a vanilla Node installation, which can be installed as a package.
Thanks!
Definitely @nathansobo !
You simply want me to change the environment preset to Rust and invoke cargo test
in the root? I would caution against running tests without testing Electron components. From experience, smoke testing with Electron is fairly straight forward and can catch breakages that other methods cannot.
@chgibb I think we'll eventually want to add integration tests that touch Electron, but for now we don't have any and are getting by reasonably well with Enzyme. Since all of the real logic is in the server, I think the risk is lower than it might be for a more complex Electron app. But eventually we'll probably need some Electron-specific tests.
I changed the script to use Travis' default rust config which calls cargo build
and cargo test
with --verbose
on both so the log is a little noisy. Let me know if this looks good.
This looks good. Are you up for adding a script that also runs npm install
and npm test
in the xray_electron
directory? I'm guessing node isn't installed by default when language
is set to rust
, so we'll need to install it, using the addons
system if possible.
Threw node and xray_electron
install and test into the Travis script. Also removed --verbose
from cargo build
and cargo test
. Should this whole functionality be split off into a bash script so it can be run by users? See log.
Can this be done without sudo? I think Travis’s container infrastructure has lower wait times.
The bash script is a good idea. I’d call it ‘script/test’.
Can this be done without sudo?
Note that you can run most sudo
commands in sudo: false
images, basically if you just need root
to install software you should be good, it's when you need "real" hardware access that you need the sudo: required
builds.
Thanks @chgibb!
Initial config for Ubuntu on Travis. At the moment this is fairly bare bones as it only builds xray and does not run tests. See log. There were some issues with clang and rustup that required some fiddling and the commit history reflects that.
22