Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

chore: switch to travis-ci.com #943

Merged
merged 5 commits into from
Feb 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto
test/fixtures/** text eol=lf
72 changes: 43 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,46 @@
# Warning: This file is automatically synced from https://github.com/ipfs/ci-sync so if you want to change it, please change it there and ask someone to sync all repositories.
sudo: false
language: node_js
cache: npm
stages:
- check
- test
- cov

matrix:
node_js:
- '10'

os:
- linux
- osx
- windows

script: npx nyc -s npm run test:node -- --bail
after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov

jobs:
include:
- node_js: 6
env: CXX=g++-4.8
- node_js: 8
env: CXX=g++-4.8
# - node_js: stable
# env: CXX=g++-4.8

script:
- npm run lint
- npm run test
- npm run coverage

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

after_success:
- npm run coverage-publish

addons:
firefox: 'latest'
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- stage: check
script:
- npx aegir commitlint --travis
- npx aegir dep-check
- npm run lint

- stage: test
name: chrome
addons:
chrome: stable
script: npx aegir test -t browser

- stage: test
name: firefox
addons:
firefox: latest
script: npx aegir test -t browser -- --browsers FirefoxHeadless

- stage: test
name: webworker
addons:
chrome: stable
script: npx aegir test -t webworker

notifications:
email: false
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<p align="center">
<a href="https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_small" alt="FOSSA Status"><img src="https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=small"/></a>
<a href="https://ci.ipfs.team/job/ipfs/job/js-ipfs-http-client/job/master/"><img src="https://ci.ipfs.team/buildStatus/icon?job=ipfs/js-ipfs-http-client/master" /></a>
<a href="https://travis-ci.com/ipfs/js-ipfs-http-client"><img src="https://flat.badgen.net/travis/ipfs/js-ipfs-http-client" /></a>
<a href="https://codecov.io/gh/ipfs/js-ipfs-http-client"><img src="https://codecov.io/gh/ipfs/js-ipfs-http-client/branch/master/graph/badge.svg"></a>
<br>
<a href="https://david-dm.org/ipfs/js-ipfs-http-client"><img src="https://david-dm.org/ipfs/js-ipfs-http-client.svg?style=flat-square" /></a>
Expand Down
29 changes: 0 additions & 29 deletions appveyor.yml

This file was deleted.

2 changes: 0 additions & 2 deletions ci/Jenkinsfile

This file was deleted.

19 changes: 0 additions & 19 deletions circle.yml

This file was deleted.

19 changes: 9 additions & 10 deletions src/files-regular/get-pull-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
const cleanCID = require('../utils/clean-cid')
const TarStreamToObjects = require('../utils/tar-stream-to-objects')
const v = require('is-ipfs')
const through = require('through2')
const pull = require('pull-stream')
const toPull = require('stream-to-pull-stream')
const deferred = require('pull-defer')
Expand All @@ -28,15 +27,15 @@ module.exports = (send) => {
send.andTransform(request, TarStreamToObjects, (err, stream) => {
if (err) { return p.end(err) }

const files = []
stream.pipe(through.obj((file, enc, next) => {
if (file.content) {
files.push({ path: file.path, content: toPull(file.content) })
} else {
files.push(file)
}
next()
}, () => p.resolve(pull.values(files))))
p.resolve(
pull(
toPull.source(stream),
pull.map(file => {
const { path, content } = file
return content ? { path, content: toPull.source(content) } : file
})
)
)
})

return p
Expand Down