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

Commit

Permalink
chore: revert build cache, add extra clause to detect timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Sep 25, 2020
1 parent 91c44d7 commit 6c5c626
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 28 deletions.
28 changes: 0 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ branches:
- /^release\/.*$/

stages:
- install
- test
- release-rc
- test-external
Expand All @@ -23,21 +22,6 @@ os:
- osx
- windows

# cache all the node modules
cache:
directories:
- node_modules
- packages/interface-ipfs-core/node_modules
- packages/ipfs/node_modules
- packages/ipfs-cli/node_modules
- packages/ipfs-core-utils/node_modules
- packages/ipfs-http-client/node_modules
- packages/ipfs-http-gateway/node_modules
- packages/ipfs-http-server/node_modules
- packages/ipfs-message-port-client/node_modules
- packages/ipfs-message-port-protocol/node_modules
- packages/ipfs-message-port-server/node_modules

env:
# This stops Windows builds from hanging
# https://travis-ci.community/t/timeout-after-build-finished-and-succeeded/1336
Expand All @@ -61,11 +45,6 @@ before_install:
# only run jobs in packages that have changed since master in PR builds
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export RUN_SINCE='--since master' ; fi

# rebuild and link to recreate symlinks that do not get cached properly
install:
- npm run link
- chmod +x */*/*/.bin/*

script:
- npm run test:node -- $RUN_SINCE -- -- --timeout 10000 --bail

Expand All @@ -82,13 +61,6 @@ jobs:

include:
# manual install step, we do this to cache the installed files for subsequent steps
- stage: install
os: linux
install:
- npm install
script:
- echo done

- stage: test
name: lint
script:
Expand Down
5 changes: 5 additions & 0 deletions packages/ipfs-http-client/src/lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ const errorHandler = async (response) => {
error = new HTTP.TimeoutError(response)
}

// This also gets returned
if (msg && msg.includes('request timed out')) {
error = new HTTP.TimeoutError(response)
}

// If we managed to extract a message from the response, use it
if (msg) {
error.message = msg
Expand Down

0 comments on commit 6c5c626

Please sign in to comment.