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
v23-beta #476
Closed
Closed
v23-beta #476
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c7b9793
chore: clean up project structure to match other TSC projects
adrianhopebailie e3a8470
chore: merge master into develop
adrianhopebailie 041ee62
v23.0.0-beta
adrianhopebailie 24f4f89
fix: add delays for some failing tests
adrianhopebailie bc7e309
fix(tests): fix tests and linting
7f70f7c
fix: update circleci script
4b2fb11
fix: integration tests
59efb2e
fix: integration tests
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# Javascript Node CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-javascript/ for more details | ||
# | ||
version: 2 | ||
|
||
defaults: &defaults | ||
working_directory: ~/repo | ||
docker: | ||
# Use active LTS release: https://github.com/nodejs/Release#release-schedule | ||
- image: circleci/node:8.12 | ||
|
||
jobs: | ||
test: | ||
<<: *defaults | ||
steps: | ||
|
||
- checkout | ||
|
||
- restore_cache: | ||
keys: | ||
# when lock file changes, use increasingly general patterns to restore cache | ||
- "node-v1-{{ .Branch }}-{{ checksum \"package-lock.json\" }}" | ||
- "node-v1-{{ .Branch }}-" | ||
- "node-v1-" | ||
|
||
- run: | ||
name: Install | ||
command: npm install | ||
|
||
- run: | ||
name: Lint | ||
command: npm run lint | ||
|
||
- run: | ||
name: Test | ||
command: npm test | ||
|
||
- run: | ||
name: Upload Test Coverage to codecov.io | ||
command: npm run report-coverage | ||
|
||
- run: | ||
name: Run Integration Tests | ||
command: if git log -1 --pretty=%B | grep -qF "[skip tests]"; then true; else npm run integration; fi | ||
|
||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: node-v1-{{ .Branch }}-{{ checksum "package-lock.json" }} | ||
|
||
- persist_to_workspace: | ||
root: ~/repo | ||
paths: . | ||
deploy: | ||
<<: *defaults | ||
steps: | ||
- attach_workspace: | ||
at: ~/repo | ||
- run: | ||
name: Authenticate with registry | ||
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc | ||
- run: | ||
name: Publish package | ||
command: npm publish | ||
|
||
workflows: | ||
version: 2 | ||
test-deploy: | ||
jobs: | ||
- test: | ||
filters: | ||
tags: | ||
only: /^v.*/ | ||
- deploy: | ||
requires: | ||
- test | ||
filters: | ||
tags: | ||
only: /^v.*/ | ||
branches: | ||
ignore: /.*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
.npmrc | ||
node_modules | ||
npm-debug.log | ||
/integration-test/* | ||
/coverage/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules/ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,8 @@ integration-test/ | |
*.cluster | ||
/npm-debug.log | ||
/coverage | ||
|
||
src | ||
tsconfig.json | ||
tslint.json | ||
typedoc.js | ||
.npmrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
FROM node:8-slim | ||
|
||
RUN mkdir -p /usr/src/app | ||
# Create app directory | ||
WORKDIR /usr/src/app | ||
|
||
COPY . /usr/src/app | ||
# Install app dependencies | ||
# A wildcard is used to ensure both package.json AND package-lock.json are copied | ||
# where available (npm@5+) | ||
COPY package*.json ./ | ||
|
||
EXPOSE 3000 | ||
RUN npm install | ||
# If you are building your code for production | ||
# RUN npm install --only=production | ||
|
||
# Bundle app source | ||
COPY . . | ||
|
||
CMD [ "npm", "start" ] |
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONNECTOR_PROFILE=connector | ||
CONNECTOR_ILP_ADDRESS=test.u3 | ||
CONNECTOR_ADMIN_API=true | ||
CONNECTOR_ADMIN_API_HOST=0.0.0.0 | ||
CONNECTOR_ACCOUNTS={"alice":{"relation":"child","sendRoutes":false,"receiveRoutes":false,"assetScale":6,"assetCode":"XRP","plugin":"ilp-plugin-btp","options":{"listener":{"port":9000, "secret": ""}}}} | ||
DEBUG=* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
CONNECTOR_PROFILE=plugin | ||
CONNECTOR_ACCOUNTS={"parent":{"relation":"parent","assetScale":6,"assetCode":"XRP","plugin":"ilp-plugin-btp","options":{"server":"btp+ws://:@172.17.0.2:9000"}}} | ||
CONNECTOR_ILP_ADDRESS_INHERIT_FROM=parent | ||
DEBUG=* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
#Connector Modes in docker | ||
|
||
#Run in connector mode | ||
Run the following command | ||
|
||
```shell | ||
docker run --net=bridge -p 7780:7780 -it --rm --env-file=./examples/docker/.connector.env --name=connector interledgerjs/ilp-connector | ||
``` | ||
|
||
Take note of the IP address of the container once running. Port 7780 is exposed to host to allow for connection to admin | ||
API | ||
|
||
#Run in plugin mode | ||
Run the following command | ||
|
||
```shell | ||
docker run --net=bridge -it --rm --env-file=./examples/docker/.plugin.env interledgerjs/ilp-connector | ||
``` | ||
|
||
Note that in .plugin.env the IP address of the parent WS connection needs to be updated to | ||
that of the container running the parent | ||
|
||
#Updating accounts | ||
|
||
profile.js has been included as an easy method to generate JSON stringified account details to pass through | ||
to the containers environment variables. Edit the account details inside and run to get the required variables. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
const connectorConfig = { | ||
ilpAddress: 'test.quickstart', | ||
accounts: { | ||
alice: { | ||
relation: 'child', | ||
sendRoutes: false, | ||
receiveRoutes: false, | ||
assetScale: 6, | ||
assetCode: 'XRP', | ||
plugin: 'ilp-plugin-btp', | ||
options: { | ||
listener: { | ||
port: 9000 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
const pluginConfig = { | ||
accounts: { | ||
parent: { | ||
relation: 'parent', | ||
sendRoutes: false, | ||
receiveRoutes: false, | ||
assetScale: 6, | ||
assetCode: 'XRP', | ||
plugin: 'ilp-plugin-btp', | ||
options: { | ||
server: 'btp+ws://:u2u3@localhost:10203' | ||
} | ||
} | ||
} | ||
} | ||
|
||
const printAccount = (config) => { | ||
console.log(JSON.stringify(config.accounts)) | ||
} | ||
|
||
printAccount(connectorConfig) | ||
printAccount(pluginConfig) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Need spaces after the
#
for this to render as a header.