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

chore: split core, http api server and cli out from ipfs module #3288

Merged
merged 44 commits into from
Sep 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
050e84b
chore: split core, http api server and cli out from ipfs module
achingbrain Sep 4, 2020
dc9d91e
chore: dedupe tests and fix linting
achingbrain Sep 16, 2020
692b1bf
chore: split gateway out into own package
achingbrain Sep 17, 2020
9ce0927
chore: mock ipfs in gateway tests
achingbrain Sep 22, 2020
dce768a
chore: fix deps
achingbrain Sep 22, 2020
b1aef91
chore: temp test script
achingbrain Sep 22, 2020
b03ebef
chore: update test scripts
achingbrain Sep 22, 2020
f1371a1
chore: fix up message port client tests
achingbrain Sep 23, 2020
7bee6aa
chore: fix up interop tests
achingbrain Sep 23, 2020
1a0ebfa
chore: control test environments from travis file
achingbrain Sep 23, 2020
607264a
chore: restore test envs
achingbrain Sep 23, 2020
368d7c3
chore: renable interface tests
achingbrain Sep 23, 2020
4bb4b32
chore: rename interface test jobs and align error message with go
achingbrain Sep 23, 2020
1f5fb9f
chore: fix up interface tests
achingbrain Sep 23, 2020
8bae148
chore: remove extra logging
achingbrain Sep 23, 2020
d0aee45
chore: restore null guard
achingbrain Sep 23, 2020
f0aa34a
chore: fix failing tests
achingbrain Sep 23, 2020
fa83a26
chore: more failing tests
achingbrain Sep 23, 2020
ac5f0d6
chore: fix up ref formatting test
achingbrain Sep 23, 2020
8ed00f9
chore: move shard tests to sharding block
achingbrain Sep 23, 2020
d352a97
chore: debug http js
achingbrain Sep 24, 2020
19faf35
chore: specify path to bin in aegir.js
achingbrain Sep 24, 2020
f761383
chore: debug http js
achingbrain Sep 24, 2020
a2844b9
chore: try caching node_modules folders
achingbrain Sep 24, 2020
76f7ebb
chore: link before building
achingbrain Sep 24, 2020
2ae72ed
chore: where is my build
achingbrain Sep 24, 2020
3301752
chore: really disable install step
achingbrain Sep 24, 2020
9a03065
chore: fix up browser tests
achingbrain Sep 24, 2020
03161d5
chore: do rebuild and link in install step
achingbrain Sep 24, 2020
2bbdaec
chore: more logging
achingbrain Sep 24, 2020
86f054b
chore: remove caching as it does not work with symlinks
achingbrain Sep 24, 2020
cac6370
chore: use top level addons
achingbrain Sep 24, 2020
15f48bb
chore: skip hrtime tests in webworkers
achingbrain Sep 24, 2020
6e8607d
chore: increase default timeout
achingbrain Sep 24, 2020
bcda138
chore: change timeouts around
achingbrain Sep 24, 2020
2d03d55
chore: increase timeout for sharding and slow webworkers
achingbrain Sep 25, 2020
0898b48
chore: increase default timeouts for webworkers and electron
achingbrain Sep 25, 2020
3e7ef89
chore: run electron and webworker tests on os x
achingbrain Sep 25, 2020
5019f71
chore: turn on go pubsub
achingbrain Sep 25, 2020
9fdf39c
chore: build worker before tests
achingbrain Sep 25, 2020
0967ba9
chore: skip sharding tests
achingbrain Sep 25, 2020
91c44d7
chore: try chmoding bin files after caching install files
achingbrain Sep 25, 2020
6c5c626
chore: revert build cache, add extra clause to detect timeouts
achingbrain Sep 25, 2020
8227840
chore: run message port tests on linux
achingbrain Sep 25, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
150 changes: 129 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ branches:
- /^release\/.*$/

stages:
- check
- test
- release-rc
- test-external
Expand Down Expand Up @@ -38,14 +37,16 @@ addons:
# https://stackoverflow.com/questions/57903415/travis-ci-chrome-62-instead-of-77
- dpkg
chrome: stable
firefox: latest

before_install:
# prevents windows error: npm ERR! ... git-sh-setup: file not found
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then export PATH=/c/PROGRA~1/Git/usr/bin:/c/PROGRA~1/Git/mingw64/libexec/git-core:$PATH ; fi
# 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

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

jobs:
allow_failures:
Expand All @@ -57,74 +58,181 @@ jobs:
- name: external - orbit-db
- name: external - ipfs-log
- name: external - sidetree

include:
- stage: check
# manual install step, we do this to cache the installed files for subsequent steps
- stage: test
name: lint
script:
- npm run build -- $RUN_SINCE --scope={ipfs,ipfs-http-client,ipfs-message-port-*}
- npm run dep-check -- $RUN_SINCE -- -- -- -i electron-webrtc
- npm run lint -- $RUN_SINCE --concurrency 1

- stage: test
name: dep-check
script:
- npm run dep-check -- $RUN_SINCE -- -- -- -i electron-webrtc

- stage: test
name: chrome
addons:
chrome: stable
script:
- npm run test:browser -- $RUN_SINCE -- -- --bail

- stage: test
name: chrome webworker
addons:
chrome: stable
script:
- npm run test:webworker -- $RUN_SINCE -- -- --bail
- npm run test:webworker -- $RUN_SINCE -- -- --bail --timeout 60000

- stage: test
name: firefox
addons:
firefox: latest
script:
- npm run test:browser -- $RUN_SINCE -- -- --bail --browsers FirefoxHeadless

- stage: test
name: firefox webworker
addons:
firefox: latest
script:
- npm run test:webworker -- $RUN_SINCE -- -- --bail --browsers FirefoxHeadless
- npm run test:webworker -- $RUN_SINCE -- -- --bail --browsers FirefoxHeadless --timeout 60000

- stage: test
name: electron-main
os: osx
script:
- npm run test:electron-main -- $RUN_SINCE -- -- --bail
- npm run test:electron-main -- $RUN_SINCE -- -- --bail --timeout 60000

- stage: test
name: electron-renderer
os: osx
script:
- npm run test:electron-renderer -- $RUN_SINCE -- -- --bail
- npm run test:electron-renderer -- $RUN_SINCE -- -- --bail --timeout 60000

- stage: test
name: interop - node
script:
- npm run test:interop:node -- $RUN_SINCE -- -- --bail
- npm run test:interop -- $RUN_SINCE -- -- -- -t node --bail

- stage: test
name: interop - browser
script:
- npm run test:interop:browser -- $RUN_SINCE -- -- --bail
- npm run test:interop -- $RUN_SINCE -- -- -- -t browser --bail

- stage: test
name: interop - electron-main
os: osx
script:
- npm run test:interop:electron-main -- $RUN_SINCE -- -- --bail --timeout 10000
- npm run test:interop -- $RUN_SINCE -- -- -- -t electron-main -f ./test/node.js --bail --timeout 60000

- stage: test
name: interop - electron-renderer
os: osx
script:
- npm run test:interop:electron-renderer -- $RUN_SINCE -- -- --bail --timeout 10000
- npm run test:interop -- $RUN_SINCE -- -- -- -t electron-renderer -f ./test/browser.js -bail --timeout 60000

- stage: test
name: js-ipfs interface tests - node
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t node

- stage: test
name: js-ipfs interface tests - chrome
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t browser

- stage: test
name: js-ipfs interface tests - chrome webworker
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000

- stage: test
name: js-ipfs interface tests - firefox
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless

- stage: test
name: js-ipfs interface tests - firefox webworker
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t webworker --browsers FirefoxHeadless --timeout 60000

- stage: test
name: js-ipfs interface tests - electron main
os: osx
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t electron-main --timeout 60000

- stage: test
name: js-ipfs interface tests - electron renderer
os: osx
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t electron-renderer --timeout 60000

- stage: test
name: http-api-client interface tests vs go-ipfs - node
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t node

- stage: test
name: http-api-client interface tests vs go-ipfs - chrome
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t browser

- stage: test
name: http-api-client interface tests vs go-ipfs - chrome webworker
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000

- stage: test
name: http-api-client interface tests vs go-ipfs - firefox
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless

- stage: test
name: http-api-client interface tests vs go-ipfs - firefox webworker
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t webworker --browsers FirefoxHeadless --timeout 60000

- stage: test
name: http-api-client interface tests vs js-ipfs - node
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t node

- stage: test
name: http-api-client interface tests vs js-ipfs - chrome
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t browser

- stage: test
name: http-api-client interface tests vs js-ipfs - chrome webworker
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000

- stage: test
name: http-api-client interface tests vs js-ipfs - firefox
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless

- stage: test
name: http-api-client interface tests vs js-ipfs - firefox webworker
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t webworker --browsers FirefoxHeadless --timeout 60000

- stage: test
name: http-api-client interface tests vs js-ipfs - electron main
os: osx
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t electron-main --timeout 60000

- stage: test
name: http-api-client interface tests vs js-ipfs - electron renderer
os: osx
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t electron-renderer --timeout 60000

- stage: test
name: ipfs-message-port-client interface tests - chrome
script:
- npm run test:interface:message-port-client -- $RUN_SINCE -- -- --bail -t browser

- stage: test
name: ipfs-message-port-client interface tests - firefox
script:
- npm run test:interface:message-port-client -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless

- stage: test
name: examples
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-exchange-files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"dependencies": {
"ipfs": "^0.50.1",
"it-all": "^1.0.1",
"it-all": "^1.0.4",
"test-ipfs-example": "^2.0.3"
},
"browser": {
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-exchange-files/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const df = createFactory({
ipfsHttpModule: require('ipfs-http-client')
}, {
js: {
ipfsBin: require.resolve('ipfs/src/cli/bin.js')
ipfsBin: require.resolve('ipfs/src/cli.js')
}
})
const {
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-http-client-upload-file/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const execa = require('execa')
const { createFactory } = require('ipfsd-ctl')
const df = createFactory({
ipfsHttpModule: require('ipfs-http-client'),
ipfsBin: require.resolve('ipfs/src/cli/bin.js')
ipfsBin: require.resolve('ipfs/src/cli.js')
})
const {
startServer
Expand Down
4 changes: 2 additions & 2 deletions examples/browser-ipns-publish/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
"ipfs-http-client": "^47.0.0",
"ipfs-utils": "^3.0.0",
"ipns": "^0.8.0",
"it-last": "^1.0.2",
"it-last": "^1.0.4",
"p-retry": "^4.2.0",
"uint8arrays": "^1.1.0"
},
"browserslist": [
"last 2 versions and not dead and > 2%"
],
"devDependencies": {
"delay": "^4.3.0",
"delay": "^4.4.0",
"execa": "^4.0.0",
"ipfsd-ctl": "^7.0.0",
"go-ipfs": "^0.6.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/browser-readablestream/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"dependencies": {
"ipfs": "^0.50.1",
"it-to-stream": "^0.1.1",
"it-to-stream": "^0.1.2",
"videostream": "^3.2.0"
}
}
2 changes: 1 addition & 1 deletion examples/circuit-relaying/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"author": "Dmitriy Ryajov <dryajov@gmail.com>",
"license": "MIT",
"dependencies": {
"delay": "^4.3.0",
"delay": "^4.4.0",
"ipfs": "^0.50.1",
"ipfs-pubsub-room": "^2.0.1",
"uint8arrays": "^1.1.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-ipfs-repo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"datastore-fs": "^2.0.0",
"ipfs": "^0.50.1",
"ipfs-repo": "^6.0.3",
"it-all": "^1.0.1"
"it-all": "^1.0.4"
},
"devDependencies": {
"execa": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/explore-ethereum-blockchain/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const df = createFactory({
ipfsHttpModule: require('ipfs-http-client')
}, {
js: {
ipfsBin: require.resolve('ipfs/src/cli/bin.js')
ipfsBin: require.resolve('ipfs/src/cli.js')
}
})

Expand Down
2 changes: 1 addition & 1 deletion examples/http-client-browser-pubsub/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const df = createFactory({
ipfsHttpModule: require('ipfs-http-client'),
}, {
js: {
ipfsBin: require.resolve('ipfs/src/cli/bin.js')
ipfsBin: require.resolve('ipfs/src/cli.js')
},
go: {
ipfsBin: require('go-ipfs').path(),
Expand Down
2 changes: 1 addition & 1 deletion examples/http-client-bundle-webpack/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const execa = require('execa')
const { createFactory } = require('ipfsd-ctl')
const df = createFactory({
ipfsHttpModule: require('ipfs-http-client'),
ipfsBin: require.resolve('ipfs/src/cli/bin.js')
ipfsBin: require.resolve('ipfs/src/cli.js')
})
const {
startServer
Expand Down
2 changes: 1 addition & 1 deletion examples/ipfs-101/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"license": "MIT",
"dependencies": {
"ipfs": "^0.50.1",
"it-all": "^1.0.1",
"it-all": "^1.0.4",
"uint8arrays": "^1.1.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/running-multiple-nodes/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async function startCliNode () {
IPFS_PATH: repoDir
}
}
const ipfs = require.resolve('ipfs/src/cli/bin.js')
const ipfs = require.resolve('ipfs/src/cli.js')

await execa(ipfs, ['init'], opts)
await execa(ipfs, ['config', 'Addresses.Swarm', '--json', JSON.stringify([`/ip4/0.0.0.0/tcp/0`, `/ip4/127.0.0.1/tcp/0/ws`])], opts)
Expand Down
2 changes: 1 addition & 1 deletion examples/traverse-ipld-graphs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dependencies": {
"cids": "^1.0.0",
"ipfs": "^0.50.1",
"ipld-block": "^0.10.0",
"ipld-block": "^0.10.1",
"ipld-dag-pb": "^0.20.0",
"multihashing-async": "^2.0.1"
}
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "JavaScript implementation of the IPFS specification",
"scripts": {
"postinstall": "lerna bootstrap",
"link": "lerna link",
"reset": "lerna run clean && rm -rf packages/*/node_modules node_modules",
"test": "lerna run test",
"test:node": "lerna run test:node",
Expand All @@ -14,10 +15,11 @@
"test:electron-renderer": "lerna run test:electron-renderer",
"test:external": "lerna run test:external",
"test:cli": "lerna run test:cli",
"test:interop:node": "lerna run test:interop:node",
"test:interop:browser": "lerna run test:interop:browser",
"test:interop:electron-main": "lerna run test:interop:electron-main",
"test:interop:electron-renderer": "lerna run test:interop:electron-renderer",
"test:interop": "lerna run test:interop",
"test:interface:core": "lerna run test:interface:core",
"test:interface:http-go": "lerna run test:interface:http-go",
"test:interface:http-js": "lerna run test:interface:http-js",
"test:interface:message-port-client": "lerna run test:interface:message-port-client",
"coverage": "lerna run coverage",
"build": "lerna run build",
"clean": "lerna run clean",
Expand Down
Loading