Fork me on GitHub
#rewrite-clj
<
2021-03-31
>
lread15:03:41

@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?

mauricio.szabo16:03:00

You mean that interactive is failing?

mauricio.szabo16:03:57

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

lread16:03:55

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

mauricio.szabo17:03:13

Right! So, one way is that after ./scripts/watch you run:

npx shadow-cljs clj-run repl-tooling.integration/run-tests-on-ci

mauricio.szabo17:03:23

That's what I use to run on CircleCI

mauricio.szabo17:03:59

You don't even need to run ./scripts/watch 😄

mauricio.szabo17:03:28

You can just run:

npm install
npx shadow-cljs clj-run repl-tooling.integration/run-tests-on-ci

mauricio.szabo17:03:33

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

mauricio.szabo17:03:27

(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)

lread17:03:37

cool, I’ll check repl-tooling for any pre-reqs needed.

lread17:03:43

I dev on macOS but CI on Linux.

lread17:03:00

I can do a brew install chromedriver so, maybe…

lread17:03:36

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.

lread17:03:59

But I’m getting failures…

lread18:03:15

I’ll try on a linux VM first.

lread18:03:09

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.

lread18:03:30

Neat what you did with Electron there though!

mauricio.szabo21:03:48

Thanks! The Electron version should not matter much, really. I'll try to see if there's something wrong on my side too

mauricio.szabo21:03:29

(I'll start some features in the near future, so I'll re-visit these tests 😄)

lread21:03:10

https://github.com/greglook/cljstyle is has upgraded to rewrite-clj v1 as part of their current release. 🎉

🎉 9