From 53b2724b843130e34eedd26daed72905c7a6b8e0 Mon Sep 17 00:00:00 2001 From: Evans Hauser Date: Fri, 31 Aug 2018 11:38:46 -0700 Subject: [PATCH] Add query check to circle ci Dogfoods apollo queries:check --- .circleci/config.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6455c73fec..be42125b84 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -59,6 +59,28 @@ jobs: - run: npm install --ignore-scripts - run: npm run lint + Query Check: + docker: [{ image: "circleci/node:8" }] + steps: + - *run_install_desired_npm + - checkout + - restore_cache: + keys: + # When lock file changes, use increasingly general patterns to restore cache + - npm-v1-{{ .Branch }}-{{ checksum "package-lock.json" }} + - npm-v1-{{ .Branch }}- + - npm-v1- + - run: npm --version + - run: npm install + - run: ./packages/apollo/bin/run queries:check --queries="packages/apollo/src/operations/*" --key=$STAGING_API_KEY --engine=https://engine-staging-graphql.apollographql.com/api/graphql + - save_cache: + key: npm-v1-{{ .Branch }}-{{ checksum "package-lock.json" }} + paths: + # This should cache the npm cache instead of node_modules, which is needed because + # npm ci actually removes node_modules before installing to guarantee a clean slate. + - ~/.npm + - run: npm run circle + ignore_doc_branches: &ignore_doc_branches filters: branches: @@ -75,3 +97,5 @@ workflows: <<: *ignore_doc_branches - Linting: <<: *ignore_doc_branches + - Query Check: + <<: *ignore_doc_branches