Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

Commit

Permalink
Merge pull request #191 from oceanprotocol/feature/ipfs
Browse files Browse the repository at this point in the history
Add files to IPFS during publish flow
  • Loading branch information
kremalicious committed Oct 14, 2019
2 parents 10b6623 + 4fb47c0 commit 54a4ba5
Show file tree
Hide file tree
Showing 57 changed files with 11,271 additions and 2,749 deletions.
5 changes: 3 additions & 2 deletions .eslintrc
Expand Up @@ -11,10 +11,11 @@
"extends": [
"oceanprotocol",
"oceanprotocol/react",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier/react",
"prettier/standard",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:cypress/recommended"
],
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -26,4 +26,5 @@ yarn-error.log*
cypress/screenshots
cypress/videos
cypress/fixtures/did.txt
cypress/fixtures/did-ipfs.txt
artifacts
20 changes: 12 additions & 8 deletions .travis.yml
Expand Up @@ -26,8 +26,14 @@ env:
- REACT_APP_SECRET_STORE_URI="http://localhost:12001"
- REACT_APP_FAUCET_URI="http://localhost:3001"
- REACT_APP_BRIZO_ADDRESS="0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0"

# IPFS client & server config
- REACT_APP_IPFS_GATEWAY_URI="https://ipfs.oceanprotocol.com"
- REACT_APP_IPFS_NODE_URI="https://ipfs.oceanprotocol.com:443"
- IPFS_GATEWAY_URI="https://ipfs.oceanprotocol.com"

# start Barge with these versions
- BRIZO_VERSION=v0.4.2
- BRIZO_VERSION=v0.4.5
- AQUARIUS_VERSION=v0.3.8
- KEEPER_VERSION=v0.11.1
- EVENTS_HANDLER_VERSION=v0.1.2
Expand Down Expand Up @@ -57,16 +63,14 @@ script:
- ./scripts/keeper.sh
- ./scripts/test.sh || travis_terminate 1
- ./scripts/coverage.sh
# Pipe the coverage data to Code Climate
- ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.client.json client/coverage/lcov.info
- ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.server.json server/coverage/lcov.info
- ./cc-test-reporter sum-coverage coverage/codeclimate.*.json -p 2
- if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter upload-coverage; fi
- npm run test:e2e || travis_terminate 1
- ./scripts/build.sh

# Pipe the coverage data to Code Climate
after_script:
- ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.client.json client/coverage/lcov.info # Format client coverage
- ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.server.json server/coverage/lcov.info # Format server coverage
- ./cc-test-reporter sum-coverage coverage/codeclimate.*.json -p 2 # Sum both coverage parts into coverage/codeclimate.json
- if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter upload-coverage; fi # Upload coverage/codeclimate.json

notifications:
email: false

Expand Down
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -31,6 +31,7 @@ If you're a developer and want to contribute to, or want to utilize this marketp
- [Client](#client)
- [Server](#server)
- [Feature Switches](#feature-switches)
- [More Settings](#more-settings)
- [👩‍🔬 Testing](#-testing)
- [Unit Tests](#unit-tests)
- [End-to-End Integration Tests](#end-to-end-integration-tests)
Expand Down Expand Up @@ -144,6 +145,14 @@ Beside configuring the network endpopints, the client allows to activate some fe
| `REACT_APP_SHOW_REQUEST_TOKENS_BUTTON` | Shows a second button on the `/faucet` route to request Ocean Tokens in addition to Ether. Will only work in Ocean testnets. |
| `REACT_APP_ALLOW_PRICING` | Activate pricing feature. Will show a price input during publish flow, and output prices for each data asset. |

#### More Settings

| Env Variable | Example | Feature Description |
| --------------------------------------------------------------------- | -------------------------------------- | ------------------------------------------------- |
| client: `REACT_APP_IPFS_GATEWAY_URI`<br /> server: `IPFS_GATEWAY_URI` | `"https://ipfs.oceanprotocol.com"` | The IPFS gateway URI. |
| `REACT_APP_IPFS_NODE_URI` | `"https://ipfs.oceanprotocol.com:443"` | The IPFS node URI used to add files to IPFS. |
| `REACT_APP_REPORT_EMAIL` | `"jelly@mcjellyfish.com"` | The email used for the _report an asset_ feature. |

## 👩‍🔬 Testing

Test suite is setup with [Jest](https://jestjs.io) and [react-testing-library](https://github.com/kentcdodds/react-testing-library) for unit testing, and [Cypress](https://www.cypress.io) for integration testing.
Expand Down
2 changes: 2 additions & 0 deletions client/.env.local.example
Expand Up @@ -59,3 +59,5 @@ REACT_APP_REPORT_EMAIL="test@example.com"
# REACT_APP_SHOW_CHANNELS=true
# REACT_APP_ALLOW_PRICING=true
# REACT_APP_SHOW_REQUEST_TOKENS_BUTTON=true
REACT_APP_IPFS_GATEWAY_URI="https://ipfs.oceanprotocol.com"
REACT_APP_IPFS_NODE_URI="https://ipfs.oceanprotocol.com:443"

0 comments on commit 54a4ba5

Please sign in to comment.