Skip to content

Commit

Permalink
Run jest't tests in the e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Oct 16, 2020
1 parent 47250ff commit 5361232
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .circleci/config.yml
Expand Up @@ -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:
Expand Down Expand Up @@ -203,3 +211,6 @@ workflows:
- e2e-vue-cli:
requires:
- publish-verdaccio
- e2e-jest:
requires:
- publish-verdaccio
46 changes: 46 additions & 0 deletions 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

0 comments on commit 5361232

Please sign in to comment.