Skip to content

Commit

Permalink
chore(nx): limit e2e tests to 5 per job
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Mann committed Oct 21, 2019
1 parent 817883d commit 69e4534
Show file tree
Hide file tree
Showing 2 changed files with 160 additions and 3 deletions.
154 changes: 152 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ matrix:
install:
- yarn install --network-timeout 1000000
script:
- yarn e2e --cli nx
- yarn e2e --cli nx 1
- os: linux
language: node_js
node_js: 12
Expand All @@ -48,7 +48,157 @@ matrix:
install:
- yarn install --network-timeout 1000000
script:
- yarn e2e --cli angular
- yarn e2e --cli nx 2
- os: linux
language: node_js
node_js: 12
dist: trusty
sudo: required
cache:
npm: false
addons:
chrome: stable
before_install:
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start;
install:
- yarn install --network-timeout 1000000
script:
- yarn e2e --cli nx 3
- os: linux
language: node_js
node_js: 12
dist: trusty
sudo: required
cache:
npm: false
addons:
chrome: stable
before_install:
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start;
install:
- yarn install --network-timeout 1000000
script:
- yarn e2e --cli nx 4
- os: linux
language: node_js
node_js: 12
dist: trusty
sudo: required
cache:
npm: false
addons:
chrome: stable
before_install:
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start;
install:
- yarn install --network-timeout 1000000
script:
- yarn e2e --cli nx 5
- os: linux
language: node_js
node_js: 12
dist: trusty
sudo: required
cache:
npm: false
addons:
chrome: stable
before_install:
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start;
install:
- yarn install --network-timeout 1000000
script:
- yarn e2e --cli nx 6
- os: linux
language: node_js
node_js: 12
dist: trusty
sudo: required
cache:
npm: false
addons:
chrome: stable
before_install:
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start;
install:
- yarn install --network-timeout 1000000
script:
- yarn e2e --cli angular 1
- os: linux
language: node_js
node_js: 12
dist: trusty
sudo: required
cache:
npm: false
addons:
chrome: stable
before_install:
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start;
install:
- yarn install --network-timeout 1000000
script:
- yarn e2e --cli angular 2
- os: linux
language: node_js
node_js: 12
dist: trusty
sudo: required
cache:
npm: false
addons:
chrome: stable
before_install:
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start;
install:
- yarn install --network-timeout 1000000
script:
- yarn e2e --cli angular 3
- os: linux
language: node_js
node_js: 12
dist: trusty
sudo: required
cache:
npm: false
addons:
chrome: stable
before_install:
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start;
install:
- yarn install --network-timeout 1000000
script:
- yarn e2e --cli angular 4
- os: linux
language: node_js
node_js: 12
dist: trusty
sudo: required
cache:
npm: false
addons:
chrome: stable
before_install:
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start;
install:
- yarn install --network-timeout 1000000
script:
- yarn e2e --cli angular 5
- os: linux
language: node_js
node_js: 12
dist: trusty
sudo: required
cache:
npm: false
addons:
chrome: stable
before_install:
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start;
install:
- yarn install --network-timeout 1000000
script:
- yarn e2e --cli angular 6

notifications:
email: false
Expand Down
9 changes: 8 additions & 1 deletion scripts/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ mkdir -p tmp/nx

if test "$1" == "--cli"; then
export SELECTED_CLI=$2
jest --maxWorkers=1 ./build/e2e/*.test.js
if [ -n "$3" ]; then
export TEST_FILES=`jest ./build/e2e/*.test.js --listTests | tail -n +$((($3 - 1) * 5 + 1)) | head -5`
if [ -n "$TEST_FILES" ]; then
jest --maxWorkers=1 $TEST_FILES
fi
else
jest --maxWorkers=1 ./build/e2e/*.test.js
fi
elif [ -n "$1" ]; then
jest --maxWorkers=1 ./build/e2e/$1.test.js
else
Expand Down

0 comments on commit 69e4534

Please sign in to comment.