exercism / elm-test-runner

GNU Affero General Public License v3.0
3 stars 5 forks source link

Parallelize test run of all exercises #46

Open jiegillet opened 1 year ago

jiegillet commented 1 year ago

The script bin/run-all-exercises-in-docker.sh is meant to run in CI and test all elm exercises in docker. It is fairly slow, so we should look into making it parallel friendly.


I've also looked if we could easily make the test run parallel but it didn't work. The trick would be to put the last for loop content in a bash function, and do the loop with a function call and a & at the end to fork in background. Unfortunately, the inside of the bin/run.sh script is not super parallel-friendly with files and all so it crashed and I didn't spend a lot of time to try figuring it out.

For me, the sequence runs in about 48s, with approximately 1s per exercise.

Originally posted by @mpizenberg in https://github.com/exercism/elm-test-runner/pull/43#pullrequestreview-1195032152

petrenkorf commented 11 months ago

@jiegillet Where can I find the instructions to execute the script?

mpizenberg commented 11 months ago

One remark about the elm compiler is that it uses a lock when compiling, so it’s not able to do multiple compilations in parallel. The only parallelizable part potentially are the actual running of the tests, and potentially the setup mechanics (I’ve forgotten how these tests are assembled).

jiegillet commented 10 months ago

@petrenkorf unfortunately documentation is poor in this repo. To run anything, you must use docker with the bin/*-in-docker.sh scripts, running things locally is complicated, you would need to manually follow the steps in Dockerfile.

Like Matthieu mentioned, this issue has many constraints and a low probability of success IMO, but of course you are welcome to give it a go.