DEV Community

dala00
dala00

Posted on • Edited on • Originally published at crieit.net

4 1

WerckerでPhoenixアプリケーションのCI

WerckerにてPhoenixアプリケーションのCIをするためのwercker.yml。
DBもservicesで追加できるので専用のコンテナを準備する必要がない。

box: shufo/phoenix:1.6.0

services:
  - id: mariadb
    name: mysql
    username: root
    password: ""
    tag: latest
    env:
      MYSQL_ALLOW_EMPTY_PASSWORD: "true"

build:
  steps:
    - script:
        name: mix format --check-formatted
        code: mix format --check-formatted

    - script:
        name: mix deps.get
        code: mix deps.get

    - script:
        name: mix test
        code: mix test
Enter fullscreen mode Exit fullscreen mode

ほんとはbrunchのビルドもしたかったのだがこのboxだとnpmコマンドが見つからない。
自分で作っているboxを使えば良いのだが、面倒だったのでとりあえずelixir側だけにした。

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay