general: artifacts: - screenshots machine: environment: PATH: "$HOME/.asdf/bin:$HOME/.asdf/shims:$PATH" MIX_ENV: "test" node: version: 8.9.1 services: - postgresql pre: - mkdir -p $CIRCLE_TEST_REPORTS/exunit - mkdir -p $CIRCLE_TEST_REPORTS/eslint dependencies: pre: - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb - sudo dpkg -i google-chrome-stable_current_amd64.deb - sudo sed -i 's|HERE/chrome\"|HERE/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome - rm google-chrome-stable_current_amd64.deb - "LATEST_RELEASE=`curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE` && wget https://chromedriver.storage.googleapis.com/${LATEST_RELEASE}/chromedriver_linux64.zip" - unzip chromedriver_linux64.zip - sudo cp chromedriver /usr/local/bin/chromedriver - sudo chmod +x /usr/local/bin/chromedriver - if ! asdf | grep version; then git clone https://github.com/HashNuke/asdf.git ~/.asdf; fi - if ! asdf plugin-list | grep erlang; then asdf plugin-add erlang https://github.com/HashNuke/asdf-erlang.git; fi - if ! asdf plugin-list | grep elixir; then asdf plugin-add elixir https://github.com/HashNuke/asdf-elixir.git; fi - awk '/erlang/ { print $2 }' .tool-versions | xargs asdf install erlang: timeout: 3600 - awk '/elixir/ { print $2 }' .tool-versions | xargs asdf install elixir: timeout: 3600 override: - yes | mix do deps.get, local.rebar, deps.compile, compile - mix dialyzer --plt - cd assets && npm install && cd .. cache_directories: - ~/.asdf - _build - deps - assets/node_modules test: pre: - mix credo - mix sobelow --private --compact --exit Low - mix dialyzer --halt-exit-status - cd assets && npm run eslint -- --format=junit --output-file="$CIRCLE_TEST_REPORTS/eslint/junit.xml" && cd .. override: - mix test post: - cp _build/test/lib/explorer/test-junit-report.xml $CIRCLE_TEST_REPORTS/exunit deployment: staging: branch: master commands: - bin/deploy poa-explorer-staging production: branch: production commands: - bin/deploy poa-explorer-production