From e5048053aac37149178b56b969b429cc7d90dab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Fri, 3 Jan 2020 17:06:13 -0500 Subject: [PATCH] Add integration test: e2e-vue-cli (#10919) * chore: add e2e-vue-cli test * chore: add node-browsers-executor * chore: state why node-browsers-executor is required --- .circleci/config.yml | 17 ++++++++++++ scripts/integration-tests/e2e-vue-cli.sh | 33 ++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100755 scripts/integration-tests/e2e-vue-cli.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 5d6df0a9428e..edf8c3c68d42 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -48,6 +48,11 @@ executors: docker: - image: circleci/node:13 working_directory: ~/babel + # e2e-vue-cli test requires chromium + node-browsers-executor: + docker: + - image: circleci/node:13-browsers + working_directory: ~/babel jobs: build-standalone: @@ -153,6 +158,14 @@ jobs: at: /tmp/verdaccio-workspace - run: ./scripts/integration-tests/e2e-create-react-app.sh + e2e-vue-cli: + executor: node-browsers-executor + steps: + - checkout + - attach_workspace: + at: /tmp/verdaccio-workspace + - run: ./scripts/integration-tests/e2e-vue-cli.sh + workflows: version: 2 build-standalone: @@ -189,3 +202,7 @@ workflows: - e2e-create-react-app: requires: - publish-verdaccio + - e2e-vue-cli: + requires: + - publish-verdaccio + diff --git a/scripts/integration-tests/e2e-vue-cli.sh b/scripts/integration-tests/e2e-vue-cli.sh new file mode 100755 index 000000000000..c640661652a9 --- /dev/null +++ b/scripts/integration-tests/e2e-vue-cli.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +#==============================================================================# +# SETUP # +#==============================================================================# + +# Start in scripts/integration-tests/ even if run from root directory +cd "$(dirname "$0")" || exit + +source utils/local-registry.sh +source utils/cleanup.sh + +# Echo every command being executed +set -x + +# Clone vue-cli +git clone --depth=1 https://github.com/vuejs/vue-cli tmp/vue-cli +cd tmp/vue-cli || exit + +#==============================================================================# +# TEST # +#==============================================================================# + +startLocalRegistry "$PWD"/../../verdaccio-config.yml +yarn install +# "yarn upgrade --scope @babel --latest" doesn't seem to work. +# a means "all", while \n is the enter needed to confirm the selection. +printf "a\n" | yarn upgrade-interactive --scope @babel --latest + +# Test +CI=true yarn test -p babel + +cleanup