github.com/segakazzz/buffalo@v0.16.22-0.20210119082501-1f52048d3feb/genny/ci/templates/-dot-circleci/config.yml.tmpl (about) 1 version: 2 2 jobs: 3 build: 4 docker: 5 - image: circleci/golang:1.12 6 {{ if eq .opts.DBType "postgres" -}} 7 - image: circleci/postgres:9.6-alpine 8 environment: 9 POSTGRES_USER: postgres 10 POSTGRES_DB: {{.opts.App.Name.File}}_test 11 {{- end }} 12 13 environment: 14 TEST_RESULTS: /tmp/test-results 15 16 steps: 17 - checkout 18 - run: mkdir -p $TEST_RESULTS 19 20 - restore_cache: 21 keys: 22 - v1-pkg-cache 23 24 - run: go get github.com/jstemmer/go-junit-report 25 26 - run: go get github.com/gobuffalo/buffalo/buffalo 27 - run: go mod download 28 29 - run: 30 name: Run unit tests 31 command: | 32 trap "go-junit-report <${TEST_RESULTS}/go-test.out > ${TEST_RESULTS}/go-test-report.xml" EXIT 33 buffalo test | tee ${TEST_RESULTS}/go-test.out 34 35 - save_cache: 36 key: v1-pkg-cache 37 paths: 38 - "/go/pkg" 39 40 - store_artifacts: 41 path: /tmp/test-results 42 destination: raw-test-output 43 44 - store_test_results: 45 path: /tmp/test-results