mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
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:
parent
7d4b11315b
commit
61466749e0
13
.github/workflows/ci.yml
vendored
13
.github/workflows/ci.yml
vendored
@ -16,17 +16,18 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '16'
|
||||||
|
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v2
|
||||||
|
env:
|
||||||
|
cache-name: cache-node-modules
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-lint-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||||
restore-keys: ${{ runner.os }}-node-
|
restore-keys: ${{ runner.os }}-lint-${{ env.cache-name }}-
|
||||||
|
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run lint
|
- run: npm run lint
|
||||||
# TODO: activate once this issue is solved:
|
# TODO: activate once this issue is solved:
|
||||||
|
34
.github/workflows/tests.yml
vendored
34
.github/workflows/tests.yml
vendored
@ -11,26 +11,29 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '16'
|
||||||
|
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v2
|
||||||
|
env:
|
||||||
|
cache-name: cache-node-modules
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-lint-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||||
restore-keys: ${{ runner.os }}-node-
|
restore-keys: ${{ runner.os }}-lint-${{ env.cache-name }}-
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
name: Checkout Barge
|
name: Checkout Barge
|
||||||
with:
|
with:
|
||||||
repository: "oceanprotocol/barge"
|
repository: 'oceanprotocol/barge'
|
||||||
path: 'barge'
|
path: 'barge'
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- name: Run Barge
|
- name: Run Barge
|
||||||
@ -39,18 +42,23 @@ jobs:
|
|||||||
ADDRESS_FILE: ${HOME}/.ocean/ocean-contracts/artifacts/address.json
|
ADDRESS_FILE: ${HOME}/.ocean/ocean-contracts/artifacts/address.json
|
||||||
run: |
|
run: |
|
||||||
bash -x start_ocean.sh --with-thegraph --no-dashboard 2>&1 > start_ocean.log &
|
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
|
sleep 5
|
||||||
[ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" ] && break
|
[ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" ] && break
|
||||||
done
|
done
|
||||||
|
cat "$HOME/.ocean/ocean-contracts/artifacts/address.json"
|
||||||
- run: npm run bargesetup
|
- run: npm run bargesetup
|
||||||
env:
|
env:
|
||||||
ADDRESS_FILE: /home/runner/.ocean/ocean-contracts/artifacts/address.json
|
ADDRESS_FILE: /home/runner/.ocean/ocean-contracts/artifacts/address.json
|
||||||
- run: npm run codegen
|
- name: create and deploy subgraph
|
||||||
- run: npm run build
|
run: |
|
||||||
- run: npm run create:local-barge
|
npm run codegen
|
||||||
- run: npm run deploy:local-barge
|
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
|
- run: npm run test-integration
|
||||||
env:
|
env:
|
||||||
ADDRESS_FILE: /home/runner/.ocean/ocean-contracts/artifacts/address.json
|
ADDRESS_FILE: /home/runner/.ocean/ocean-contracts/artifacts/address.json
|
||||||
|
|
38014
package-lock.json
generated
38014
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -37,12 +37,12 @@
|
|||||||
"changelog": "auto-changelog -p"
|
"changelog": "auto-changelog -p"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@graphprotocol/graph-cli": "^0.20.1",
|
"@graphprotocol/graph-cli": "^0.18.0",
|
||||||
"@graphprotocol/graph-ts": "^0.20.1",
|
"@graphprotocol/graph-ts": "^0.20.1",
|
||||||
"@types/chai": "^4.2.21",
|
"@types/chai": "^4.2.21",
|
||||||
"@types/chai-spies": "^1.0.3",
|
"@types/chai-spies": "^1.0.3",
|
||||||
"@types/mocha": "^9.0.0",
|
"@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",
|
"@typescript-eslint/parser": "^4.28.5",
|
||||||
"auto-changelog": "^2.3.0",
|
"auto-changelog": "^2.3.0",
|
||||||
"chai": "^4.3.4",
|
"chai": "^4.3.4",
|
||||||
@ -59,7 +59,7 @@
|
|||||||
"typescript": "^4.3.5"
|
"typescript": "^4.3.5"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@oceanprotocol/lib": "^0.15.1",
|
"@oceanprotocol/lib": "^0.17.0",
|
||||||
"cross-fetch": "^3.1.4"
|
"cross-fetch": "^3.1.4"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -6,7 +6,7 @@ import { Ocean, ConfigHelper, Account } from '@oceanprotocol/lib'
|
|||||||
const fetch = require('cross-fetch')
|
const fetch = require('cross-fetch')
|
||||||
const web3 = new Web3('http://127.0.0.1:8545')
|
const web3 = new Web3('http://127.0.0.1:8545')
|
||||||
const subgraphUrl =
|
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) {
|
function sleep(ms: number) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
setTimeout(resolve, ms)
|
setTimeout(resolve, ms)
|
||||||
@ -19,6 +19,7 @@ describe('Datatokens test flow', () => {
|
|||||||
let ocean: Ocean
|
let ocean: Ocean
|
||||||
|
|
||||||
it('Initialize Ocean Library', async () => {
|
it('Initialize Ocean Library', async () => {
|
||||||
|
// await sleep(60000) // wait 1 min for graph
|
||||||
const config = new ConfigHelper().getConfig('development')
|
const config = new ConfigHelper().getConfig('development')
|
||||||
config.web3Provider = web3
|
config.web3Provider = web3
|
||||||
ocean = await Ocean.getInstance(config)
|
ocean = await Ocean.getInstance(config)
|
||||||
|
Loading…
Reference in New Issue
Block a user