(´・ω・`)そんな言い方ってない

ヲタエンジニアの備忘録的なもの

Goなプロジェクトで使うCircleCIのcircle.yml

Categories: CircleCI Go Golang

Date: 2016/01/27

も少し綺麗にしたい(´・ω・`)

  • checkout:cd $HOME && git clone …しているだろうと思って$HOMEを弄ってみたが撃沈
  • pwd:test:では使えないので撃沈

machine:
  timezone: Asia/Tokyo
  environment:
    GO15VENDOREXPERIMENT: 1
    VCS : "github.com"
    REPO_ROOT: "${HOME}/.go_workspace/src/${VCS}/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}"
dependencies:
  pre:
    - go get -u github.com/tools/godep
    - go get -u github.com/golang/lint/golint
checkout:
  post:
    - mkdir -p ${REPO_ROOT}
    - cp -rf ${HOME}/${CIRCLE_PROJECT_REPONAME} ${HOME}/.go_workspace/src/${VCS}/${CIRCLE_PROJECT_USERNAME}/
test:
  pre:
    - cd ${REPO_ROOT} && godep restore
    - cd ${REPO_ROOT} && for package in `go list ./...| grep -v vendor`; do golint ${package}; done
    - cd ${REPO_ROOT} && go vet ./...
  override:
    - cd ${REPO_ROOT} && godep go test -cover -bench -benchmem `go list ./... | grep -v /vendor/` -v