@mauricio.szabo I gave your instructions for repl-tooling
a try. Cool! But interactive(?). Is there something I could run on CI that returns pass/fail?
You mean that interactive is failing?
Strange, interactive-test
is passing for me. You can open the devtools console on Electron and see what's wrong (I believe its ctrl
-`shift`-`i`) or try to restart the compiler and then reload the electron app
Ha! Always room for confusion! By “interactive(?)” I meant can I run something non-interactive that would exit with 0 on success. I can see why you thought I was referring to interactive-test
which frankly, I am not even aware of yet! :simple_smile:
I only ran the commands you shared with me in chat:
npm install
./script/watch
npm start
Right! So, one way is that after ./scripts/watch
you run:
npx shadow-cljs clj-run repl-tooling.integration/run-tests-on-ci
That's what I use to run on CircleCI
Wait...
You don't even need to run ./scripts/watch
😄
Aha!
You can just run:
npm install
npx shadow-cljs clj-run repl-tooling.integration/run-tests-on-ci
This will fire up the watch process for shadow, start the "fixture app", run the tests, and will exit with code 0
if tests pass, or 1
if something fails.
I believe it'll also retry tests that fail up to 5 times
(It's just an etaoin code to scrap the tests from the Electron app, really 😄. So I believe you'll need Chromedriver - if you're on Linux, you can get it from here: https://chromedriver.storage.googleapis.com/76.0.3809.126/chromedriver_linux64.zip)
cool, I’ll check repl-tooling
for any pre-reqs needed.
I dev on macOS but CI on Linux.
I can do a brew install chromedriver
so, maybe…
Ah no the brew installed chromedriver mismatches. But there is https://www.npmjs.com/package/electron-chromedriver, but no exact match for electron 6.0.2, but maybe 6.0.0 will work? Yeah, I can launch your tests.
But I’m getting failures…
I’ll try on a linux VM first.
Hmm.. I’m getting test failures on my linux VM as well. I shall probably put adding repl-tooling to rewrite-clj libs tests on on hold for now.
Neat what you did with Electron there though!
Thanks! The Electron version should not matter much, really. I'll try to see if there's something wrong on my side too
(I'll start some features in the near future, so I'll re-visit these tests 😄)
https://github.com/greglook/cljstyle is has upgraded to rewrite-clj v1 as part of their current release. 🎉