Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Commit

Permalink
Use generic CircleCI container (#982)
Browse files Browse the repository at this point in the history
* Update npm dependencies for github repos

The newer version of npm fails otherwise

Testing:
1. Remove node_modules
2. npm install

Make sure it works

* Move reporter install into dependencies vs postinstall

* Try using CircleCI-provided container rather than custom

* Remove nvm reference from run-wrapper

* Try to get caching to work
  • Loading branch information
hoverduck committed Feb 28, 2018
1 parent f066417 commit 84afc9d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 27 deletions.
16 changes: 8 additions & 8 deletions .circleci/config.yml
Expand Up @@ -2,23 +2,23 @@ version: 2
jobs:
build:
parallelism: 2
working_directory: /wp-e2e-tests
working_directory: ~/wp-e2e-tests
docker:
- image: automattic/wp-e2e-tests:0.0.8
- image: circleci/node:8.9.4-browsers
environment:
NODE_ENV: test
NODE_CONFIG: {}
steps:
- checkout
- restore_cache:
key: << checksum "package.json" >>
- run: source $HOME/.nvm/nvm.sh && npm install
- run: source $HOME/.nvm/nvm.sh && npm run lint
- run: source $HOME/.nvm/nvm.sh && npm run decryptconfig
key: dependency-cache-{{ checksum "package.json" }}
- run: npm install
- run: npm run lint
- run: npm run decryptconfig
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- /wp-e2e-tests/node_modules
key: << checksum "package.json" >>
- ./node_modules
- run: ./scripts/randomize.sh specs
- run: ./scripts/run-wrapper.sh
- store_test_results:
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
@@ -0,0 +1 @@
*node_modules*
12 changes: 2 additions & 10 deletions run.sh
Expand Up @@ -21,15 +21,7 @@ if [ "$NODE_ENV" = "" ]; then
exit 1
fi

# On CI, use nvm to define NodeJS version if possible
if [ "$CI" == "true" ]; then
if [ -d $HOME/.nvm ]; then
export NVM_DIR="$HOME/.nvm"
fi

[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install

# Temporary workaround to force an updated version of Chrome on CircleCI 1.0 containers
# https://github.com/Automattic/wp-e2e-tests/issues/783
# p6fDka-v0-p2
Expand Down Expand Up @@ -177,8 +169,8 @@ while getopts ":a:Rpb:B:s:gjWCJH:wl:cm:fiIUvxu:h" opt; do
NODE_CONFIG_ARGS+=("\"failVisdiffs\":\"true\"")
;;
x)
# NODE_CONFIG_ARGS+=("\"headless\":\"true\"")
MAGELLAN="xvfb-run $MAGELLAN"
NODE_CONFIG_ARGS+=("\"headless\":\"true\"")
# MAGELLAN="xvfb-run $MAGELLAN"
;;
u)
NODE_CONFIG_ARGS+=("\"calypsoBaseURL\":\"$OPTARG\"")
Expand Down
9 changes: 0 additions & 9 deletions scripts/run-wrapper.sh
@@ -1,14 +1,5 @@
#!/bin/bash

if [ "$CI" == "true" ]; then
if [ -d $HOME/.nvm ]; then
export NVM_DIR="$HOME/.nvm"
fi

[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install
fi

# Notify Slack if any tests are being skipped -- Only runs on Node 0 so you just get one ping
# -- Note that since this is called before run.sh the BROWSERSIZE variable is not yet set and
# it will always say "screen size 'desktop'"
Expand Down

0 comments on commit 84afc9d

Please sign in to comment.