From 87618b85f18750d45e958dbbe6f886db7d6faa71 Mon Sep 17 00:00:00 2001 From: douglas Date: Wed, 5 Sep 2018 19:02:06 +1000 Subject: [PATCH] #30 - Preventing race condition with database --- .circleci/config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 415e36c5..2217e820 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -64,6 +64,14 @@ jobs: - v1-dependencies-{{ checksum "package.json" }} # fallback to using the latest cache if no exact match is found - v1-dependencies- + - run: + name: install dockerize + command: wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz + environment: + DOCKERIZE_VERSION: v0.6.1 + - run: + name: Wait for db + command: dockerize -wait tcp://localhost:3306 -timeout 1m - run: npm install - run: npm run refresh-db - run: npm test