Created
January 5, 2018 10:55
-
-
Save gorkunov/d5766551016a3e7e77385c84c42e4a75 to your computer and use it in GitHub Desktop.
Phoenix, node.js (webpack), postgres - linting + tests - circleCI (2.0)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: bitwalker/alpine-elixir-phoenix:1.5.2 | |
- image: postgres:9.4.1 | |
environment: | |
POSTGRES_USER: ubuntu | |
working_directory: ~/repo | |
steps: | |
- checkout | |
- restore_cache: | |
keys: | |
- v2-mix-cache-{{ .Branch }}-{{ checksum "mix.lock" }} | |
- v2-mix-cache-{{ .Branch }} | |
- v2-mix-cache | |
- restore_cache: | |
keys: | |
- v2-build-cache-{{ .Branch }} | |
- v2-build-cache | |
- restore_cache: | |
keys: | |
- v2-npm-cache-{{ .Branch }}-{{ checksum "package-lock.json" }} | |
- v2-npm-cache-{{ .Branch }} | |
- v2-npm-cache | |
- run: mix do deps.get, compile | |
- run: | |
command: mix compile | |
environment: | |
MIX_ENV: test | |
- run: ls -laR _build > build_checksum | |
- run: npm install | |
- save_cache: | |
key: v2-mix-cache-{{ .Branch }}-{{ checksum "mix.lock" }} | |
paths: deps | |
- save_cache: | |
key: v2-build-cache-{{ .Branch }}-{{ checksum "build_checksum" }} | |
paths: _build | |
- save_cache: | |
key: v2-npm-cache-{{ .Branch }}-{{ checksum "package-lock.json" }} | |
paths: node_modules | |
- run: npm run lint | |
- run: mix phx.digest | |
- run: mix credo | |
- run: mix do ecto.create, ecto.migrate | |
- run: mix test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment