bensu / doo

doo is a library and lein plugin to run cljs.test on different js environments.
Eclipse Public License 1.0
324 stars 63 forks source link

CI upheaval: Upgrade to Circle 2.0 and use Bats #167

Closed miikka closed 6 years ago

miikka commented 6 years ago

First, apologies for proposing such a big change without discussing it first.

CircleCI is sunsetting CircleCI 1.0 in August, so I thought it'd be a good time to upgrade to 2.0. While at it, I decided to try some other changes to bring down the time it takes to run the test suite. This should make the why on Earth is the Circle build failing again problem easier to deal with.

This patch splits the test suite into three CircleCI jobs: installing dependencies, running the tests for the plugin and the library, and running the tests against the example project. The example step makes use of Circle's parallelism feature to speed things up. The example tests are split into four parts which are run in parallel.

The example tests are now invoked using Bats. This way it's easy to split them up. Bats's TAP output allows us to get Circle's test summaries. Previously they weren't needed since each test was a separate build step, but for parallelism, they must be run all in one build step. The test summaries are way easier to read than the huge log for the build step. (Also, you can run the tests on your local machine with bats example/test/bats, although I doubt this will be used much.)

I've dropped some test cases:

Altogether, these changes bring the test suite runtime on Circle down to around 10-15 minutes from 1 h 20 min.