diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2019-03-25 20:29:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-25 20:29:05 -0400 |
| commit | 32bf91dccb2b4e4e2b68cf2c385e688eb788ba0e (patch) | |
| tree | 416414124211b0123f51e7ff587c0608afd94cd6 | |
| parent | ca9741c8e89163b8bef7fb9cc205d3ab9874447f (diff) | |
| parent | 7892a3a6378724a13cc284b6d84e7500fff9e805 (diff) | |
Merge pull request #523 from hairyhenderson/split-build-with-workflows
Parallelize CircleCi build
| -rw-r--r-- | .circleci/config.yml | 57 |
1 files changed, 48 insertions, 9 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 9a7abbab..35240cc9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,14 +1,38 @@ version: 2.1 -jobs: - build: + +references: + workspace_root: &workspace_root + /go/src/github.com/hairyhenderson/gomplate + attach_workspace: &attach_workspace + attach_workspace: + at: *workspace_root + +executors: + ci-executor: docker: - image: hairyhenderson/gomplate-ci-build:latest environment: - - CIRCLE_TEST_REPORTS: /tmp/test-results - working_directory: /go/src/github.com/hairyhenderson/gomplate + CIRCLE_TEST_REPORTS: /tmp/test-results + working_directory: *workspace_root + +jobs: + build: + executor: ci-executor steps: - checkout - run: make build + - store_artifacts: + path: bin + destination: binaries + - persist_to_workspace: + root: *workspace_root + # Must be relative path from root + paths: + - ./ + test: + executor: ci-executor + steps: + - checkout - run: cc-test-reporter before-build - run: name: make test @@ -16,10 +40,25 @@ jobs: trap "go-junit-report < $CIRCLE_TEST_REPORTS/go-test.out > $CIRCLE_TEST_REPORTS/report.xml" EXIT make test | tee $CIRCLE_TEST_REPORTS/go-test.out cc-test-reporter after-build --exit-code $? - - run: make lint - - run: make integration - - store_artifacts: - path: bin - destination: binaries - store_test_results: path: /tmp/test-results + lint: + executor: ci-executor + steps: + - checkout + - run: make lint + integration: + executor: ci-executor + steps: + - checkout + - *attach_workspace + - run: make integration + +workflows: + version: 2 + build: + jobs: + - build + - test + - lint + - integration |
