From 1be4a7e5d0ea0183c4d5d492faaf6e80dfa64c9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Fri, 16 Oct 2020 15:03:58 +0200 Subject: [PATCH] Run jest't tests in the e2e tests --- .circleci/config.yml | 8 ++++++ scripts/integration-tests/e2e-jest.sh | 38 +++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 scripts/integration-tests/e2e-jest.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index a4700f075ac1..3cf69979adb8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -153,6 +153,14 @@ jobs: at: /tmp/verdaccio-workspace - run: ./scripts/integration-tests/e2e-vue-cli.sh + e2e-jest: + executor: node-executor + steps: + - checkout + - attach_workspace: + at: /tmp/verdaccio-workspace + - run: ./scripts/integration-tests/e2e-jest.sh + workflows: version: 2 build-standalone: diff --git a/scripts/integration-tests/e2e-jest.sh b/scripts/integration-tests/e2e-jest.sh new file mode 100644 index 000000000000..644aad85531e --- /dev/null +++ b/scripts/integration-tests/e2e-jest.sh @@ -0,0 +1,38 @@ +#!/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 jest +git clone --depth=1 https://github.com/facebook/jest tmp/jest +cd tmp/jest || exit + +#==============================================================================# +# ENVIRONMENT # +#==============================================================================# +node -v +yarn --version +python --version + +#==============================================================================# +# TEST # +#==============================================================================# + +startLocalRegistry "$PWD"/../../verdaccio-config.yml +yarn install +yarn build + +# Test +CI=true yarn test + +cleanup