Skip to content

Instantly share code, notes, and snippets.

@phuochau
Last active September 24, 2017 13:01
Show Gist options
  • Save phuochau/61a103d7c6c7d263b8882b7bd8e1a555 to your computer and use it in GitHub Desktop.
Save phuochau/61a103d7c6c7d263b8882b7bd8e1a555 to your computer and use it in GitHub Desktop.
CircleCI 2.0 configuration for Phoenix project
# Phoenix CircleCI 2.0 configuration file
#
# Modify configuration for Ecto in config/test.exs like below:
#
# config :project, Project.Repo,
# adapter: Ecto.Adapters.Postgres,
# username: System.get_env("DATA_DB_USER"),
# password: System.get_env("DATA_DB_PASS"),
# hostname: System.get_env("DATA_DB_HOST"),
# database: "project",
# pool: Ecto.Adapters.SQL.Sandbox
#
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: elixir:1.4.5
environment:
- MIX_ENV: test
- DATA_DB_USER: postgres
- DATA_DB_PASS: postgres
- DATA_DB_HOST: localhost
- image: postgres:9.6
working_directory: ~/repo
steps:
- checkout
- run:
name: Install dependencies
command: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- run:
name: Compile
command: mix compile
- run:
name: Linting
command: mix credo --strict
- run:
name: Unit Testing
command: mix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment