From 699ba225ce38a22fded2998794304a6dc00f3cca Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 2 May 2018 15:10:58 -0700 Subject: [PATCH] chore: test on node10 (#59) --- .../google-cloud-vision/.circleci/config.yml | 77 ++++++------------- 1 file changed, 24 insertions(+), 53 deletions(-) diff --git a/packages/google-cloud-vision/.circleci/config.yml b/packages/google-cloud-vision/.circleci/config.yml index 529add30190..d394fa2290e 100644 --- a/packages/google-cloud-vision/.circleci/config.yml +++ b/packages/google-cloud-vision/.circleci/config.yml @@ -19,12 +19,17 @@ workflows: filters: tags: only: /.*/ + - node10: + filters: + tags: + only: /.*/ - lint: requires: - node4 - node6 - node8 - node9 + - node10 filters: tags: only: /.*/ @@ -34,6 +39,7 @@ workflows: - node6 - node8 - node9 + - node10 filters: tags: only: /.*/ @@ -90,14 +96,18 @@ jobs: else echo "Not a nightly build, skipping this step." fi - - run: - name: Install modules and dependencies. - command: |- + - run: &npm_install_and_link + name: Install and link the module. + command: | + mkdir -p /home/node/.npm-global npm install repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" if ! test -x "$repo_tools"; then chmod +x "$repo_tools" fi + npm link + environment: + NPM_CONFIG_PREFIX: /home/node/.npm-global - run: name: Run unit tests. command: npm test @@ -120,6 +130,11 @@ jobs: - image: 'node:9' user: node steps: *unit_tests_steps + node10: + docker: + - image: 'node:10' + user: node + steps: *unit_tests_steps lint: docker: - image: 'node:8' @@ -127,19 +142,8 @@ jobs: steps: - checkout - run: *remove_package_lock - - run: - name: Install modules and dependencies. - command: | - mkdir -p /home/node/.npm-global - npm install - repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" - if ! test -x "$repo_tools"; then - chmod +x "$repo_tools" - fi - npm link - environment: - NPM_CONFIG_PREFIX: /home/node/.npm-global - - run: + - run: *npm_install_and_link + - run: &samples_npm_install_and_link name: Link the module being tested to the samples. command: | cd samples/ @@ -160,14 +164,7 @@ jobs: steps: - checkout - run: *remove_package_lock - - run: - name: Install modules and dependencies. - command: |- - npm install - repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" - if ! test -x "$repo_tools"; then - chmod +x "$repo_tools" - fi + - run: *npm_install_and_link - run: name: Build documentation. command: npm run docs @@ -184,27 +181,8 @@ jobs: openssl aes-256-cbc -d -in .circleci/key.json.enc \ -out .circleci/key.json \ -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" - - run: - name: Install and link the module. - command: | - mkdir -p /home/node/.npm-global - npm install - repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" - if ! test -x "$repo_tools"; then - chmod +x "$repo_tools" - fi - npm link - environment: - NPM_CONFIG_PREFIX: /home/node/.npm-global - - run: - name: Link the module being tested to the samples. - command: | - cd samples/ - npm link @google-cloud/vision - npm install - cd .. - environment: - NPM_CONFIG_PREFIX: /home/node/.npm-global + - run: *npm_install_and_link + - run: *samples_npm_install_and_link - run: name: Run sample tests. command: npm run samples-test @@ -230,14 +208,7 @@ jobs: openssl aes-256-cbc -d -in .circleci/key.json.enc \ -out .circleci/key.json \ -k "${SYSTEM_TESTS_ENCRYPTION_KEY}" - - run: - name: Install modules and dependencies. - command: |- - npm install - repo_tools="node_modules/@google-cloud/nodejs-repo-tools/bin/tools" - if ! test -x "$repo_tools"; then - chmod +x "$repo_tools" - fi + - run: *npm_install_and_link - run: name: Run system tests. command: npm run system-test