diff --git a/README.md b/README.md index d94458063..91f526b97 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,22 @@ ![Code Corps Phoenix Logo](https://d3pgew4wbk2vb1.cloudfront.net/images/github/code-corps-api.png) -[![CircleCI](https://circleci.com/gh/code-corps/code-corps-api.svg?style=svg)](https://circleci.com/gh/code-corps/code-corps-api) +[![CircleCI](https://circleci.com/gh/code-corps/code-corps-api.svg?style=svg)](https://circleci.com/gh/code-corps/code-corps-api) [![Coverage Status](https://coveralls.io/repos/github/code-corps/code-corps-api/badge.svg?branch=develop)](https://coveralls.io/github/code-corps/code-corps-api?branch=develop) [![Deps Status](https://beta.hexfaktor.org/badge/all/github/code-corps/code-corps-api.svg)](https://beta.hexfaktor.org/github/code-corps/code-corps-api) ## Installing with Docker To make your life easier, you can just clone this repository and use our Docker container. [Follow this guide to get started.](docs/INSTALLING.md) +## Continuous Integration + +We use [CircleCI](https://circleci.com/) to test your branches and continuously deploy branches merged into `develop` to our staging API and branches merged into `master` to our production API. + +If your test fails on Circle, you should re-check your tests. Sometimes this indicates a mismatch between your environment and our expected environment. + +The `circle.yml` file specifies what happens in the builds. You can [read more about that in Circle's documentation](https://circleci.com/docs/configuration/). + +The CircleCI builds also rely on some environment variables for reporting, deployments, and other requirements. + ## Learn more * Official website: http://www.phoenixframework.org/ diff --git a/circle.yml b/circle.yml index 800aec5c1..28ab847ff 100644 --- a/circle.yml +++ b/circle.yml @@ -13,7 +13,7 @@ dependencies: - mix compile test: override: - - mix test + - mix coveralls.circle deployment: staging: diff --git a/docs/USAGE.md b/docs/USAGE.md index 89494da76..363e7864a 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -12,7 +12,6 @@ To run the tests you can run `docker-compose run test mix test`. If you ever need to rebuild you can run `docker-compose up --build`. Unless you've destroyed your Docker container images, this should be faster than the first run. - ### Pushing changes You can use `git` as you normally would, either on your own host machine or in Docker's `web` container. diff --git a/mix.exs b/mix.exs index f4c88fdfe..d6207992e 100644 --- a/mix.exs +++ b/mix.exs @@ -10,7 +10,8 @@ defmodule CodeCorps.Mixfile do build_embedded: Mix.env == :prod, start_permanent: Mix.env == :prod, aliases: aliases(), - deps: deps()] + deps: deps(), + test_coverage: [tool: ExCoveralls]] end # Configuration for the OTP application. @@ -69,6 +70,7 @@ defmodule CodeCorps.Mixfile do {:arc, git: "https://github.com/stavro/arc.git", ref: "354d4d2e1b86bcd6285db3528118fe3f5db36cf5", override: true}, # Photo uploads {:arc_ecto, "~> 0.4.3"}, {:ex_aws, "~> 0.4.10"}, # Amazon AWS + {:excoveralls, "~> 0.5", only: :test}, # Test coverage {:httpoison, "~> 0.7"}, {:poison, "~> 1.2"}, {:canary, "~> 0.14.2"}, # Authorization