diff --git a/.circleci/config.yml b/.circleci/config.yml index a4700f075ac1..bfe138f473c5 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: @@ -203,3 +211,6 @@ workflows: - e2e-vue-cli: requires: - publish-verdaccio + - e2e-jest: + requires: + - publish-verdaccio diff --git a/scripts/integration-tests/e2e-jest.sh b/scripts/integration-tests/e2e-jest.sh new file mode 100644 index 000000000000..70e921d7146f --- /dev/null +++ b/scripts/integration-tests/e2e-jest.sh @@ -0,0 +1,46 @@ +#!/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 + +# Update @babel/* dependencies +bump_deps="$PWD/../../utils/bump-babel-dependencies.js" +node "$bump_deps" +for d in ./packages/*/ +do + (cd "$d"; node "$bump_deps") +done + +#==============================================================================# +# ENVIRONMENT # +#==============================================================================# +node -v +yarn --version +python --version + +#==============================================================================# +# TEST # +#==============================================================================# + +startLocalRegistry "$PWD"/../../verdaccio-config.yml +yarn install +yarn build + +# Test +CI=true yarn test + +cleanup