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

Commit

Permalink
fix: update to new aegir (#3528)
Browse files Browse the repository at this point in the history
- update aegir
- fix some linting
- enable multiple test runs at the same time (all servers now try to find free ports)

Co-authored-by: achingbrain <[email protected]>
  • Loading branch information
hugomrdias and achingbrain authored Mar 7, 2021
1 parent 7e33d82 commit 49f7880
Show file tree
Hide file tree
Showing 78 changed files with 487 additions and 489 deletions.
19 changes: 3 additions & 16 deletions .github/workflows/bundlesize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,20 @@ on:
name: Bundlesize
jobs:
check:
runs-on: ubuntu-latest
runs-on: ubuntu-latest # https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md
strategy:
matrix:
node-version: [14.x]
project:
- packages/ipfs-core-utils
- packages/ipfs-core
- packages/ipfs-http-client
- packages/ipfs
- packages/ipfs-message-port-protocol
- packages/ipfs-message-port-client
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Restore dependencies
id: cache-modules
uses: actions/checkout@v2
with:
path: node_modules
key: ${{ matrix.node-version }}-${{ runner.OS }}-build-${{ hashFiles('package.json') }}
- name: Install dependencies
run: npm install
- run: npm install
- name: Bundlesize ${{ matrix.project }}
uses: ipfs/aegir/actions/bundle-size@v29.0.0
uses: ipfs/aegir/actions/bundle-size@v31.0.4
with:
project: ${{ matrix.project }}
github_token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 0 additions & 6 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Restore dependencies
id: cache-modules
uses: actions/checkout@v2
with:
path: node_modules
key: ${{ matrix.node-version }}-${{ runner.OS }}-build-${{ hashFiles('package.json') }}
- name: Install dependencies
run: npm install
- name: Typecheck ${{ matrix.project }}
Expand Down
65 changes: 41 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: node_js
dist: bionic

services:
- xvfb
Expand Down Expand Up @@ -31,25 +32,41 @@ env:
addons:
apt:
packages:
# Fixes error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
# https://github.com/electron/electron/issues/1518
- libgconf-2-4
# Ensure chrome is the latest version
# https://stackoverflow.com/questions/57903415/travis-ci-chrome-62-instead-of-77
- dpkg
# These are required to run webkit
- libwoff1
- libopus0
- libwebp6
- libwebpdemux2
- libenchant1c2a
- libgudev-1.0-0
- libsecret-1-0
- libhyphen0
- libgdk-pixbuf2.0-0
- libegl1
- libgles2
- libevent-2.1-6
- libnotify4
- libxslt1.1
- libvpx5
# gstreamer and plugins to support video playback in WebKit.
- gstreamer1.0-gl
- gstreamer1.0-plugins-base
- gstreamer1.0-plugins-good
- gstreamer1.0-plugins-bad
# This is required to run chromium
- libgbm1
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
# modules with pre-built binaries may not have deployed versions for bleeding-edge node so this lets us fall back to building from source
- npm install -g node-pre-gyp
- npm install -g @mapbox/node-pre-gyp

script:
- npm run test:node -- $RUN_SINCE -- -- --timeout 10000 --bail
- npm run test:node -- $RUN_SINCE -- -- --timeout 10000 --bail -- --exit # TODO remove --exit https://mochajs.org/#-exit

jobs:
allow_failures:
Expand Down Expand Up @@ -91,12 +108,12 @@ jobs:
- stage: test
name: firefox
script:
- npm run test:browser -- $RUN_SINCE -- -- --bail --browsers FirefoxHeadless
- npm run test:browser -- $RUN_SINCE -- -- --bail -- --browser firefox

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

- stage: test
name: electron-main
Expand Down Expand Up @@ -131,7 +148,7 @@ jobs:
- stage: test
name: js-ipfs interface tests - node
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t node
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t node -- --exit # TODO remove --exit https://mochajs.org/#-exit

- stage: test
name: js-ipfs interface tests - chrome
Expand All @@ -146,12 +163,12 @@ jobs:
- stage: test
name: js-ipfs interface tests - firefox
script:
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless
- npm run test:interface:core -- $RUN_SINCE -- -- --bail -t browser -- --browser firefox

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

- stage: test
name: js-ipfs interface tests - electron main
Expand All @@ -166,7 +183,7 @@ jobs:
- stage: test
name: js-ipfs interface tests - ipfs-client - node
script:
- npm run test:interface:client -- $RUN_SINCE -- -- --bail -t node
- npm run test:interface:client -- $RUN_SINCE -- -- --bail -t node -- --exit # TODO remove --exit https://mochajs.org/#-exit

- stage: test
name: js-ipfs interface tests - ipfs-client - chrome
Expand All @@ -181,12 +198,12 @@ jobs:
- stage: test
name: js-ipfs interface tests - ipfs-client - firefox
script:
- npm run test:interface:client -- $RUN_SINCE -- -- --bail -t browser --browsers FirefoxHeadless
- npm run test:interface:client -- $RUN_SINCE -- -- --bail -t browser -- --browser firefox

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

- stage: test
name: js-ipfs interface tests - ipfs-client - electron main
Expand All @@ -201,7 +218,7 @@ jobs:
- stage: test
name: http-api-client interface tests vs go-ipfs - node
script:
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t node
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t node -- --exit # TODO remove --exit https://mochajs.org/#-exit

- stage: test
name: http-api-client interface tests vs go-ipfs - chrome
Expand All @@ -216,17 +233,17 @@ jobs:
- 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
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t browser -- --browser firefox

- 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
- npm run test:interface:http-go -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000 -- --browser firefox

- stage: test
name: http-api-client interface tests vs js-ipfs - node
script:
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t node
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t node -- --exit # TODO remove --exit https://mochajs.org/#-exit

- stage: test
name: http-api-client interface tests vs js-ipfs - chrome
Expand All @@ -241,12 +258,12 @@ jobs:
- 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
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t browser --browser firefox

- 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
- npm run test:interface:http-js -- $RUN_SINCE -- -- --bail -t webworker --timeout 60000 -- --browser firefox

- stage: test
name: http-api-client interface tests vs js-ipfs - electron main
Expand All @@ -266,7 +283,7 @@ jobs:
- 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
- npm run test:interface:message-port-client -- $RUN_SINCE -- -- --bail -t browser -- --browser firefox

- stage: test
name: examples
Expand Down
5 changes: 1 addition & 4 deletions examples/browser-browserify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@
"devDependencies": {
"browserify": "^16.2.3",
"concat-stream": "^2.0.0",
"execa": "^4.0.3",
"execa": "^5.0.0",
"http-server": "^0.12.3",
"ipfs": "^0.54.2",
"rimraf": "^3.0.2",
"test-ipfs-example": "^3.0.0"
},
"browser": {
"ipfs": "ipfs/dist/index.min.js"
}
}
9 changes: 3 additions & 6 deletions examples/browser-exchange-files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,16 @@
"license": "MIT",
"devDependencies": {
"browserify": "^16.2.3",
"execa": "^4.0.3",
"execa": "^5.0.0",
"http-server": "^0.12.3",
"ipfs-http-client": "^49.0.2",
"uint8arrays": "^2.0.5"
"uint8arrays": "^2.1.3"
},
"dependencies": {
"ipfs": "^0.54.2",
"it-all": "^1.0.4",
"libp2p-websockets": "^0.15.0",
"libp2p-websockets": "^0.15.1",
"rimraf": "^3.0.2",
"test-ipfs-example": "^3.0.0"
},
"browser": {
"ipfs": "ipfs/dist/index.min.js"
}
}
6 changes: 3 additions & 3 deletions examples/browser-ipns-publish/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
"ipns": "^0.8.0",
"it-last": "^1.0.4",
"p-retry": "^4.2.0",
"uint8arrays": "^2.0.5"
"uint8arrays": "^2.1.3"
},
"browserslist": [
"last 2 versions and not dead and > 2%"
],
"devDependencies": {
"delay": "^4.4.0",
"execa": "^4.0.3",
"execa": "^5.0.0",
"ipfsd-ctl": "^7.2.0",
"go-ipfs": "0.8.0-rc2",
"go-ipfs": "0.8.0",
"parcel-bundler": "^1.12.4",
"path": "^0.12.7",
"test-ipfs-example": "^3.0.0"
Expand Down
6 changes: 3 additions & 3 deletions examples/browser-parceljs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"ipfs": "^0.54.2"
},
"devDependencies": {
"@babel/cli": "^7.1.5",
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.3.1",
"@babel/cli": "7.13.0",
"@babel/core": "7.13.0",
"@babel/preset-env": "7.13.0",
"babel-plugin-syntax-async-functions": "^6.13.0",
"babel-plugin-transform-regenerator": "^6.26.0",
"babel-polyfill": "^6.26.0",
Expand Down
6 changes: 3 additions & 3 deletions examples/browser-service-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"license": "MIT",
"keywords": [],
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.3.1",
"babel-loader": "^8.0.5",
"@babel/core": "7.13.0",
"@babel/preset-env": "7.13.0",
"babel-loader": "^8.2.2",
"copy-webpack-plugin": "^5.0.4",
"test-ipfs-example": "^3.0.0",
"webpack": "5.4.0",
Expand Down
3 changes: 0 additions & 3 deletions examples/browser-service-worker/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ module.exports = {
.url(process.env.IPFS_EXAMPLE_TEST_URL)
.waitForElementVisible('body')


browser.expect.element('body').text.to.contain('Load content by adding IPFS path to the URL')
browser.expect.element('a').text.to.contain('/ipfs/bafy')

Expand All @@ -19,8 +18,6 @@ module.exports = {
.waitForElementVisible('body')
.waitForElementVisible('iframe')



browser.element('css selector', 'iframe', frame => {
browser.frame({ ELEMENT: frame.value.ELEMENT }, () => {
browser.waitForElementPresent('body')
Expand Down
15 changes: 12 additions & 3 deletions examples/browser-service-worker/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const webpack = require('webpack')
const CopyWebpackPlugin = require('copy-webpack-plugin')

module.exports = {
mode: "development",
mode: 'development',
devtool: 'source-map',
entry: './src/main.js',
output: {
Expand All @@ -28,15 +28,24 @@ module.exports = {
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
presets: [
[
'@babel/preset-env',
{
targets: {
esmodules: true
}
}
]
]
}
}
}
]
},
resolve: {
fallback: {
"stream": require.resolve("stream-browserify")
stream: require.resolve('stream-browserify')
}
},
plugins: [
Expand Down
6 changes: 3 additions & 3 deletions examples/browser-sharing-node-across-tabs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"license": "MIT",
"keywords": [],
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.3.1",
"babel-loader": "^8.0.5",
"@babel/core": "7.13.0",
"@babel/preset-env": "7.13.0",
"babel-loader": "^8.2.2",
"copy-webpack-plugin": "^5.0.4",
"rimraf": "^3.0.2",
"test-ipfs-example": "^3.0.0",
Expand Down
Loading

0 comments on commit 49f7880

Please sign in to comment.