When running elm-test
on Circle CI, your builds will run indefinitely due to an issue with determining CPU usage. The following might help be of help to you.
Configure Circle CI (i.e. circle.yml
) as follows:
machine:
environment:
YARN_VERSION: 0.17.10
PATH: "${PATH}:${HOME}/.yarn/bin"
node:
version: 7.2.1
dependencies:
pre:
- |
if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
fi
override:
- yarn install
post:
# Workaround to Elm CI test suite timeout: https://github.com/elm-lang/elm-compiler/issues/1473.
- if [ ! -d libsysconfcpus ]; then git clone https://github.com/obmarg/libsysconfcpus.git; fi
- cd libsysconfcpus && ./configure && make && sudo make install
cache_directories:
- libsysconfcpus
- ~/.yarn
- ~/.yarn-cache
test:
override:
- yarn run ci
In order to get the yarn run ci
command, used above, to work properly you'll want to configure your Yarn package.json
as follows:
{
"name": "example",
"version": "0.1.0",
"description": "Example",
"main": "index.js",
"repository": "https://github.com/example/example",
"author": "Brooke Kuhlmann",
"license": "MIT",
"devDependencies": {
"elm": "^0.18.0",
"elm-live": "^2.6.0",
"elm-test": "^0.18.2"
},
"scripts": {
"test": "elm-test",
"ci": "sysconfcpus --num 1 elm-test"
}
}