From 3f66537bb42c08eaaeb206fbb56afd15c2a74a92 Mon Sep 17 00:00:00 2001 From: Bradley Kemp Date: Tue, 3 Sep 2019 22:30:57 +0100 Subject: [PATCH 1/4] Add clean working dir test --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index a1f40b3..d016008 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,6 +11,7 @@ jobs: - codecov/upload: file: unit-coverage.out flags: "unit" + - run: git diff --quiet && echo "Working directory clean" || (echo "Working directory not clean"; exit 1) integration-tests: docker: From fa90cdb2f2fe5bd05cf41356b97af25afde091c2 Mon Sep 17 00:00:00 2001 From: Bradley Kemp Date: Tue, 3 Sep 2019 22:33:04 +0100 Subject: [PATCH 2/4] Also run after integration tests --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d016008..cf8b9d9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,6 +24,7 @@ jobs: - codecov/upload: file: integration-coverage.out flags: "integration" + - run: git diff --quiet && echo "Working directory clean" || (echo "Working directory not clean"; exit 1) release: docker: From 599b6fea463e76ea9acb86066774585bd1eb3690 Mon Sep 17 00:00:00 2001 From: Bradley Kemp Date: Tue, 3 Sep 2019 22:38:18 +0100 Subject: [PATCH 3/4] Run as separate step --- .circleci/config.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cf8b9d9..4616b88 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,6 +2,14 @@ version: 2.1 orbs: codecov: codecov/codecov@1.0.5 jobs: + check-dependencies: + docker: + - image: circleci/golang:1.12 + steps: + - checkout + - run: go mod verify + - run: git diff --quiet && echo "Working directory clean" || (echo "Working directory not clean"; exit 1) + unit-tests: docker: - image: circleci/golang:1.12 @@ -11,7 +19,6 @@ jobs: - codecov/upload: file: unit-coverage.out flags: "unit" - - run: git diff --quiet && echo "Working directory clean" || (echo "Working directory not clean"; exit 1) integration-tests: docker: @@ -24,7 +31,6 @@ jobs: - codecov/upload: file: integration-coverage.out flags: "integration" - - run: git diff --quiet && echo "Working directory clean" || (echo "Working directory not clean"; exit 1) release: docker: From db0dad887de448fa7a28dd479936a04d66b82d71 Mon Sep 17 00:00:00 2001 From: Bradley Kemp Date: Tue, 3 Sep 2019 22:39:28 +0100 Subject: [PATCH 4/4] Add to build_and_test --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4616b88..0a42824 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,6 +43,7 @@ workflows: version: 2 build_and_test: jobs: + - check-dependencies - unit-tests - integration-tests release: