Manual bump test (#181)

* bump

* ci possible fix

* ci fix

* ci fx

* fix tests

* test

* more test

* more test

* test

* t

* remove console

* test

* test

* add env

* wait contracts

* test

* t

* t

* add sleep

* bump lib again

* bump eslint

* Update Datatokens.test.ts

* log result

* test url

* fix url

* Update Datatokens.test.ts

* Update tests.yml

* url test

* Update tests.yml

* Update tests.yml

* Update tests.yml

* fix

* fix

* remove unused script

* remove console logs

* shorter wait time

* remove logs from test

Co-authored-by: Alex Coseru <alex.coseru@gmail.com>
This commit is contained in:
mihaisc 2021-08-03 15:16:02 +03:00 committed by GitHub
parent 7d4b11315b
commit 61466749e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 32824 additions and 5244 deletions

View File

@ -16,17 +16,18 @@ jobs:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '16'
- name: Cache node modules
uses: actions/cache@v1
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
key: ${{ runner.os }}-lint-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-lint-${{ env.cache-name }}-
- run: npm ci
- run: npm run lint
# TODO: activate once this issue is solved:

View File

@ -11,26 +11,29 @@ on:
jobs:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '16'
- name: Cache node modules
uses: actions/cache@v1
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
key: ${{ runner.os }}-lint-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-lint-${{ env.cache-name }}-
- uses: actions/checkout@v2
name: Checkout Barge
with:
repository: "oceanprotocol/barge"
repository: 'oceanprotocol/barge'
path: 'barge'
- run: npm ci
- name: Run Barge
@ -39,18 +42,23 @@ jobs:
ADDRESS_FILE: ${HOME}/.ocean/ocean-contracts/artifacts/address.json
run: |
bash -x start_ocean.sh --with-thegraph --no-dashboard 2>&1 > start_ocean.log &
for i in $(seq 1 500); do
for i in $(seq 1 1500); do
sleep 5
[ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" ] && break
done
cat "$HOME/.ocean/ocean-contracts/artifacts/address.json"
- run: npm run bargesetup
env:
ADDRESS_FILE: /home/runner/.ocean/ocean-contracts/artifacts/address.json
- run: npm run codegen
- run: npm run build
- run: npm run create:local-barge
- run: npm run deploy:local-barge
- name: create and deploy subgraph
run: |
npm run codegen
npm run build
npm run create:local-barge
npm run deploy:local-barge
sleep 20
env:
ADDRESS_FILE: /home/runner/.ocean/ocean-contracts/artifacts/address.json
- run: npm run test-integration
env:
ADDRESS_FILE: /home/runner/.ocean/ocean-contracts/artifacts/address.json

38014
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -37,12 +37,12 @@
"changelog": "auto-changelog -p"
},
"devDependencies": {
"@graphprotocol/graph-cli": "^0.20.1",
"@graphprotocol/graph-cli": "^0.18.0",
"@graphprotocol/graph-ts": "^0.20.1",
"@types/chai": "^4.2.21",
"@types/chai-spies": "^1.0.3",
"@types/mocha": "^9.0.0",
"@typescript-eslint/eslint-plugin": "^4.28.4",
"@typescript-eslint/eslint-plugin": "^4.28.5",
"@typescript-eslint/parser": "^4.28.5",
"auto-changelog": "^2.3.0",
"chai": "^4.3.4",
@ -59,7 +59,7 @@
"typescript": "^4.3.5"
},
"dependencies": {
"@oceanprotocol/lib": "^0.15.1",
"@oceanprotocol/lib": "^0.17.0",
"cross-fetch": "^3.1.4"
},
"repository": {

View File

@ -6,7 +6,7 @@ import { Ocean, ConfigHelper, Account } from '@oceanprotocol/lib'
const fetch = require('cross-fetch')
const web3 = new Web3('http://127.0.0.1:8545')
const subgraphUrl =
'http://localhost:9000/subgraphs/name/oceanprotocol/ocean-subgraph'
'http://127.0.0.1:9000/subgraphs/name/oceanprotocol/ocean-subgraph'
function sleep(ms: number) {
return new Promise((resolve) => {
setTimeout(resolve, ms)
@ -19,6 +19,7 @@ describe('Datatokens test flow', () => {
let ocean: Ocean
it('Initialize Ocean Library', async () => {
// await sleep(60000) // wait 1 min for graph
const config = new ConfigHelper().getConfig('development')
config.web3Provider = web3
ocean = await Ocean.getInstance(config)