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 - if ! asdf plugin-list | grep ruby; then asdf plugin-add ruby https://github.com/HashNuke/asdf-ruby.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 - awk '/ruby/ { print $2 }' .tool-versions | xargs asdf install ruby: timeout: 3600 - gem install bundler override: - yes | mix do deps.get, local.rebar, deps.compile, compile - bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 - mix dialyzer --plt - cd assets && npm install && npm run build && cd .. cache_directories: - ~/.asdf - _build - deps - assets/node_modules - vendor/bundle test: pre: - mix credo - mix sobelow --config - mix dialyzer --halt-exit-status - bundle exec license_finder --project-path=. --decisions-file=doc/dependency_decisions.yml - bundle exec license_finder --project-path=assets --decisions-file=doc/dependency_decisions.yml - 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