-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: config typescript #904
Changes from 11 commits
cec3ce7
a3a2f15
ab0f087
b0db319
8083aae
2bff878
040495d
55bfbe2
5159d23
e69eba6
8e91334
98325d9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: examples | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: npx aegir lint | ||
- run: npx aegir ts -p check | ||
- run: npx aegir build | ||
test-auto-relay-example: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: cd examples && yarn && npm run test -- auto-relay | ||
test-chat-example: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: cd examples && yarn && npm run test -- chat | ||
test-connection-encryption-example: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: cd examples && yarn && npm run test -- connection-encryption | ||
test-discovery-mechanisms-example: | ||
needs: check | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: cd examples && yarn && npm run test -- discovery-mechanisms | ||
test-echo-example: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: cd examples && yarn && npm run test -- echo | ||
test-libp2p-in-the-browser-example: | ||
needs: check | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: cd examples && yarn && npm run test -- libp2p-in-the-browser | ||
test-peer-and-content-routing-example: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: cd examples && yarn && npm run test -- peer-and-content-routing | ||
test-pnet-example: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: cd examples && yarn && npm run test -- pnet | ||
test-protocol-and-stream-muxing-example: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: cd examples && yarn && npm run test -- protocol-and-stream-muxing | ||
test-pubsub-example: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: cd examples && yarn && npm run test -- pubsub | ||
test-transports-example: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: cd examples && yarn && npm run test -- transports | ||
test-webrtc-direct-example: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: cd examples && yarn && npm run test -- webrtc-direct |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,11 +12,11 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: yarn lint | ||
- uses: gozala/typescript-error-reporter-action@v1.0.8 | ||
- run: yarn build | ||
- run: yarn aegir dep-check | ||
- run: npm install | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because yarn does not run prepare in the dependencies, libp2p-interfaces branch does not have types |
||
- run: npx aegir lint | ||
- run: npx aegir ts -p check | ||
- run: npx aegir build | ||
- run: npx aegir dep-check | ||
- uses: ipfs/aegir/actions/bundle-size@master | ||
name: size | ||
with: | ||
|
@@ -34,111 +34,34 @@ jobs: | |
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- run: yarn | ||
- run: npm install | ||
- run: npx nyc --reporter=lcov aegir test -t node -- --bail | ||
vasco-santos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- uses: codecov/codecov-action@v1 | ||
test-chrome: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: npm install | ||
- run: npx aegir test -t browser -t webworker --bail | ||
test-firefox: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: npm install | ||
- run: npx aegir test -t browser -t webworker --bail -- --browsers FirefoxHeadless | ||
vasco-santos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
test-interop: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: cd node_modules/interop-libp2p && yarn && LIBP2P_JS=${GITHUB_WORKSPACE}/src/index.js npx aegir test -t node --bail | ||
test-auto-relay-example: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: cd examples && yarn && npm run test -- auto-relay | ||
test-chat-example: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: cd examples && yarn && npm run test -- chat | ||
test-connection-encryption-example: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: cd examples && yarn && npm run test -- connection-encryption | ||
test-discovery-mechanisms-example: | ||
needs: check | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: cd examples && yarn && npm run test -- discovery-mechanisms | ||
test-echo-example: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: cd examples && yarn && npm run test -- echo | ||
test-libp2p-in-the-browser-example: | ||
needs: check | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: cd examples && yarn && npm run test -- libp2p-in-the-browser | ||
test-peer-and-content-routing-example: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: cd examples && yarn && npm run test -- peer-and-content-routing | ||
test-pnet-example: | ||
test-ts: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: cd examples && yarn && npm run test -- pnet | ||
test-protocol-and-stream-muxing-example: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: cd examples && yarn && npm run test -- protocol-and-stream-muxing | ||
test-pubsub-example: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: cd examples && yarn && npm run test -- pubsub | ||
test-transports-example: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: cd examples && yarn && npm run test -- transports | ||
test-webrtc-direct-example: | ||
- run: npm install | ||
- run: npm run test:ts | ||
test-interop: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: yarn | ||
- run: cd examples && yarn && npm run test -- webrtc-direct | ||
- run: npm install | ||
- run: cd node_modules/interop-libp2p && yarn && LIBP2P_JS=${GITHUB_WORKSPACE}/src/index.js npx aegir test -t node --bail |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ docs | |
test/repo-tests* | ||
**/bundle.js | ||
.cache | ||
.parcel-cache | ||
|
||
# Logs | ||
logs | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"version": "0.0.1", | ||
"private": true, | ||
"description": "", | ||
"main": "dist/index.html", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm guessing it's a parcel thing ..? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. parcel thing per their new updates |
||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build": "parcel build index.html", | ||
|
@@ -15,14 +16,15 @@ | |
"babel-plugin-syntax-async-functions": "^6.13.0", | ||
"babel-plugin-transform-regenerator": "^6.26.0", | ||
"babel-polyfill": "^6.26.0", | ||
"parcel-bundler": "1.12.3" | ||
"parcel-bundler": "1.12.3", | ||
"util": "^0.12.3" | ||
}, | ||
"dependencies": { | ||
"libp2p": "../../", | ||
"libp2p-bootstrap": "^0.12.1", | ||
"libp2p-mplex": "^0.10.1", | ||
"libp2p-noise": "^2.0.1", | ||
"libp2p-webrtc-direct": "^0.5.0", | ||
"libp2p-webrtc-direct": "^0.6.0", | ||
"peer-id": "^0.14.3" | ||
}, | ||
"browser": { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this get pulled out intentionally? It is quite useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed based on: https://github.com/ipfs/aegir/blob/master/md/github-actions.md
Thought the recommendation was
ts -p check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error reporter action shows you which lines have errors in a visual form as part of the PR, the aegir command makes you dig through the console output. Both do the same thing and use the same rules but the action is a little more user friendly IMHO.