Skip to content

Commit

Permalink
Update config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiarossi authored Sep 23, 2019
1 parent eeadc26 commit 104c1aa
Showing 1 changed file with 57 additions and 10 deletions.
67 changes: 57 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ workspace_root: &workspace_root
defaults: &defaults
working_directory: *workspace_root
docker:
- image: gruntwork/circle-ci-test-image-base
- image: 087285199408.dkr.ecr.us-east-1.amazonaws.com/circle-ci-test-image-base:go1.11

version: 2
jobs:
Expand All @@ -26,6 +26,48 @@ jobs:
- persist_to_workspace:
root: *workspace_root
paths: vendor
# We're running unit tests separately from integration tests - with no parallelization.
# With heavy parallelization coupled with re-use of test fixtures we've witnessed slight
# instability with the tests. The unit tests are fast to execute, so there is negligible
# performance penalty.
unit_test:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: *workspace_root
- run:
command: |
mkdir -p logs
run-go-tests --circle-ci-2 --parallelism 1 --packages "$(go list ./... | grep -v /test | tr '\n' ' ')" | tee logs/unit.log
- run:
command: terratest_log_parser --testlog logs/unit.log --outputdir logs
when: always
- store_artifacts:
path: logs
- store_test_results:
path: logs

integration_test:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: *workspace_root
# Make GCP Service Account creds available as a file
- run: echo $GCLOUD_SERVICE_KEY > ${HOME}/gcloud-service-key.json
- run: echo 'export GOOGLE_APPLICATION_CREDENTIALS=${HOME}/gcloud-service-key.json' >> $BASH_ENV
- run:
command: |
mkdir -p logs
run-go-tests --circle-ci-2 --packages "$(go list ./... | grep /test | tr '\n' ' ')" | tee logs/integration.log
- run:
command: terratest_log_parser --testlog logs/integration.log --outputdir logs
when: always
- store_artifacts:
path: logs
- store_test_results:
path: logs

build:
<<: *defaults
Expand Down Expand Up @@ -55,18 +97,24 @@ workflows:
filters:
tags:
only: /^v.*/
branches:
ignore:
- master
- unit_test:
requires:
- install_dependencies
filters:
tags:
only: /^v.*/
- integration_test:
requires:
- unit_test
filters:
tags:
only: /^v.*/
- build:
requires:
- install_dependencies
- integration_test
filters:
tags:
only: /^v.*/
branches:
ignore:
- master

- deploy:
requires:
Expand All @@ -75,8 +123,7 @@ workflows:
tags:
only: /^v.*/
branches:
ignore:
- master
ignore: /.*/

nightly:
triggers:
Expand Down

0 comments on commit 104c1aa

Please sign in to comment.