2021-04-13 17:10:03 +02:00
|
|
|
name: 'Integration tests'
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- '**'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '**'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
2022-05-12 19:31:12 +02:00
|
|
|
strategy:
|
2021-08-03 14:16:02 +02:00
|
|
|
max-parallel: 1
|
2021-04-13 17:10:03 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-02-14 09:35:55 +01:00
|
|
|
- uses: actions/setup-node@v2
|
2021-04-13 17:10:03 +02:00
|
|
|
with:
|
2021-08-03 14:16:02 +02:00
|
|
|
node-version: '16'
|
2022-02-14 09:35:55 +01:00
|
|
|
- name: Cache node_modules
|
2021-08-03 14:16:02 +02:00
|
|
|
uses: actions/cache@v2
|
|
|
|
env:
|
|
|
|
cache-name: cache-node-modules
|
2021-04-13 17:10:03 +02:00
|
|
|
with:
|
|
|
|
path: ~/.npm
|
2022-02-14 09:35:55 +01:00
|
|
|
key: ${{ runner.os }}-test-integration-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
restore-keys: ${{ runner.os }}-test-integration-${{ env.cache-name }}-
|
2021-08-03 14:16:02 +02:00
|
|
|
|
2022-02-14 09:35:55 +01:00
|
|
|
# Env var expansion workaround
|
|
|
|
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
|
|
|
|
- name: Set ADDRESS_FILE
|
|
|
|
run: echo "ADDRESS_FILE=${HOME}/.ocean/ocean-contracts/artifacts/address.json" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Checkout Barge
|
|
|
|
uses: actions/checkout@v2
|
2021-04-13 17:10:03 +02:00
|
|
|
with:
|
2021-08-03 14:16:02 +02:00
|
|
|
repository: 'oceanprotocol/barge'
|
2021-04-13 17:10:03 +02:00
|
|
|
path: 'barge'
|
2022-06-20 15:46:54 +02:00
|
|
|
ref: main
|
2022-02-14 09:35:55 +01:00
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
if: ${{ env.DOCKERHUB_PASSWORD && env.DOCKERHUB_USERNAME }}
|
|
|
|
run: |
|
|
|
|
echo "Login to Docker Hub";echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
|
|
|
|
env:
|
|
|
|
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
|
2021-04-13 17:10:03 +02:00
|
|
|
- name: Run Barge
|
|
|
|
working-directory: ${{ github.workspace }}/barge
|
|
|
|
run: |
|
2022-02-14 09:35:55 +01:00
|
|
|
bash -x start_ocean.sh --with-thegraph --skip-subgraph-deploy --no-dashboard 2>&1 > start_ocean.log &
|
2022-03-14 13:40:05 +01:00
|
|
|
env:
|
2023-11-21 14:55:49 +01:00
|
|
|
CONTRACTS_VERSION: predictoor3
|
2022-05-12 19:31:12 +02:00
|
|
|
|
2022-02-14 09:35:55 +01:00
|
|
|
- run: npm ci
|
|
|
|
|
|
|
|
- name: Wait for contracts deployment
|
|
|
|
working-directory: ${{ github.workspace }}/barge
|
|
|
|
run: |
|
|
|
|
for i in $(seq 1 250); do
|
|
|
|
sleep 10
|
2021-04-13 17:10:03 +02:00
|
|
|
[ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" ] && break
|
|
|
|
done
|
2021-08-03 14:16:02 +02:00
|
|
|
- name: create and deploy subgraph
|
|
|
|
run: |
|
2022-02-17 11:59:55 +01:00
|
|
|
npm run quickstart:barge
|
2021-08-03 14:16:02 +02:00
|
|
|
sleep 20
|
|
|
|
env:
|
|
|
|
ADDRESS_FILE: /home/runner/.ocean/ocean-contracts/artifacts/address.json
|
Implementing first pass of veAllocate schema, handlers, and test cove… (#490)
* Implementing first pass of veAllocate schema, handlers, and test coverage.
* Fixed compiling issues, wrote compiling & testing outline inside of veAllocate.test. More to come.
* Created documentation. Moving tests away from subgraph and into df-py.
* Expanding documentation to be thorough and cover more of the work involved.
* use barge artifacts
* use proper contracts in ci
* use barge artifacts folder
* fix replace
* use npm contracts dep
* use latest contracts for barge
* fix some lint
* Fix linter errors
* Update schema
* Finished basic integration of setAllocation event and verified queries/schema is working as intended.
* Fixing amount getter.
* Fixed remaining implementation, verified SimpleSubgraph.test is working, and fixed lint errors.
* Fixing import.
* Use .zero()
* Improve readability
* Add allocated to schema
* Update abi
* Update event handlers in the template
* Update veREADME
* Remove `AllocationRemoved` handler
* Hooking data for tx, firstContact, lastUpdate, block
* Update event abi
* Add chainId and nftAddress to schema
* Update `handleAllocationSet`
* Update abi
* Update readme
* Set initial values
* Fix math
* Missing event param
* set initial value of `lastContact`
* veOcean template
* VeOcean entity
* Handler functions - wip
* rename file
* Delegation schema
* veDelegate mapping file
* Rename
* Update template
* Update schema
* Update replaces
* Add handler for delegation
* Update schema
* getveDelegation
* Update naming
* Add deposit entity
* Update template
* Make delegation an array
* Add `handleDelegation`
* Add `handleDeposit` for veOCEAN
* Add `getveOCEAN` util function
* Add `getDeposit` util function
* Add `handleBurnBoost`
* Add `handleExtendBoost`
* Add `handleTransferBoost`
* Set default veOCEAN
* Remove unused import
* Rename Deposit to VeDeposit
* Include block number
* Remove `allocatedTotal`
* Updating schema and fixing errors due to naming changes. Let's keep the user current allocation, maybe we need to create a feature to more easily let them know whether they are fully allocated, or not..
* bump contracts to v1.1.1
* bump contracts
* bump to contracts 1.1.2
* fix script for networks without ve
* add veAllocation.sol's AllocationSetMultiple
* copy artfacts from barge for npm quickstart:barge
* fix using barge artifacts
* temp debug
* use barge artifacts
* use contracts 1.1.3
* use same approach for 'development'
* bump ocean-contracts
Co-authored-by: alexcos20 <alex.coseru@gmail.com>
Co-authored-by: mihaisc <mihai@oceanprotocol.com>
Co-authored-by: trizin <25263018+trizin@users.noreply.github.com>
2022-09-05 14:07:31 +02:00
|
|
|
BARGE_FOLDER: /home/runner/.ocean/
|
2021-04-13 17:10:03 +02:00
|
|
|
- run: npm run test-integration
|
|
|
|
env:
|
|
|
|
ADDRESS_FILE: /home/runner/.ocean/ocean-contracts/artifacts/address.json
|
Implementing first pass of veAllocate schema, handlers, and test cove… (#490)
* Implementing first pass of veAllocate schema, handlers, and test coverage.
* Fixed compiling issues, wrote compiling & testing outline inside of veAllocate.test. More to come.
* Created documentation. Moving tests away from subgraph and into df-py.
* Expanding documentation to be thorough and cover more of the work involved.
* use barge artifacts
* use proper contracts in ci
* use barge artifacts folder
* fix replace
* use npm contracts dep
* use latest contracts for barge
* fix some lint
* Fix linter errors
* Update schema
* Finished basic integration of setAllocation event and verified queries/schema is working as intended.
* Fixing amount getter.
* Fixed remaining implementation, verified SimpleSubgraph.test is working, and fixed lint errors.
* Fixing import.
* Use .zero()
* Improve readability
* Add allocated to schema
* Update abi
* Update event handlers in the template
* Update veREADME
* Remove `AllocationRemoved` handler
* Hooking data for tx, firstContact, lastUpdate, block
* Update event abi
* Add chainId and nftAddress to schema
* Update `handleAllocationSet`
* Update abi
* Update readme
* Set initial values
* Fix math
* Missing event param
* set initial value of `lastContact`
* veOcean template
* VeOcean entity
* Handler functions - wip
* rename file
* Delegation schema
* veDelegate mapping file
* Rename
* Update template
* Update schema
* Update replaces
* Add handler for delegation
* Update schema
* getveDelegation
* Update naming
* Add deposit entity
* Update template
* Make delegation an array
* Add `handleDelegation`
* Add `handleDeposit` for veOCEAN
* Add `getveOCEAN` util function
* Add `getDeposit` util function
* Add `handleBurnBoost`
* Add `handleExtendBoost`
* Add `handleTransferBoost`
* Set default veOCEAN
* Remove unused import
* Rename Deposit to VeDeposit
* Include block number
* Remove `allocatedTotal`
* Updating schema and fixing errors due to naming changes. Let's keep the user current allocation, maybe we need to create a feature to more easily let them know whether they are fully allocated, or not..
* bump contracts to v1.1.1
* bump contracts
* bump to contracts 1.1.2
* fix script for networks without ve
* add veAllocation.sol's AllocationSetMultiple
* copy artfacts from barge for npm quickstart:barge
* fix using barge artifacts
* temp debug
* use barge artifacts
* use contracts 1.1.3
* use same approach for 'development'
* bump ocean-contracts
Co-authored-by: alexcos20 <alex.coseru@gmail.com>
Co-authored-by: mihaisc <mihai@oceanprotocol.com>
Co-authored-by: trizin <25263018+trizin@users.noreply.github.com>
2022-09-05 14:07:31 +02:00
|
|
|
BARGE_FOLDER: /home/runner/.ocean/
|
2023-11-21 14:55:49 +01:00
|
|
|
- name: docker logs
|
2023-05-13 14:00:52 +02:00
|
|
|
run: docker logs ocean_graph-node_1
|
|
|
|
if: ${{ failure() }}
|