mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
c6004336ae
* first cut, still WIP * use specific contracts image * fix missing abi * more predictoor * more predictoor * done predictoor logic * fix * update * merge #682 * update ready logic * fixes * lint * increase timeout * add oasis-saphire-testnet * bump to contracts v2.0.0-next.2 * add loop for crappy rpc * merge template * fixes 1 * fixes * fix predictor detection * Use latest predictoor contracts (#708) * Update tests.yml * Update handlers * Update schema * Linter * Update abi and fields * use latest contracts * use latest contracts * expose agg preds in trueval * fix abi path * remove unused abis * fix --------- Co-authored-by: trizin <25263018+trizin@users.noreply.github.com> * bump contracts * Remove floatValue from predictoor trueval handler (#714) * Update predictSlot status on trueval submit (#716) * Update status * Fix * Update contracts version * Use number for predict slot * Fixes * Linter * Fix * Fix * tostring * Fix * Fix * Fix * use contracts v2.0.0-next.11 * use latest graph-cli * remove --debug flag * Feature/add predictoor pause event (#723) * bump contracts * add pause for predictoorContract * bump contracts to v2.0.0-13 * bum contracts & add sapphire mainnet * fix lock --------- Co-authored-by: trizin <25263018+trizin@users.noreply.github.com>
80 lines
2.5 KiB
YAML
80 lines
2.5 KiB
YAML
name: 'Integration tests'
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
max-parallel: 1
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '16'
|
|
- name: Cache node_modules
|
|
uses: actions/cache@v2
|
|
env:
|
|
cache-name: cache-node-modules
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-test-integration-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: ${{ runner.os }}-test-integration-${{ env.cache-name }}-
|
|
|
|
# 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
|
|
with:
|
|
repository: 'oceanprotocol/barge'
|
|
path: 'barge'
|
|
ref: main
|
|
|
|
- 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 }}
|
|
|
|
- name: Run Barge
|
|
working-directory: ${{ github.workspace }}/barge
|
|
run: |
|
|
bash -x start_ocean.sh --with-thegraph --skip-subgraph-deploy --no-dashboard 2>&1 > start_ocean.log &
|
|
env:
|
|
CONTRACTS_VERSION: predictoor3
|
|
|
|
- run: npm ci
|
|
|
|
- name: Wait for contracts deployment
|
|
working-directory: ${{ github.workspace }}/barge
|
|
run: |
|
|
for i in $(seq 1 250); do
|
|
sleep 10
|
|
[ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" ] && break
|
|
done
|
|
- name: create and deploy subgraph
|
|
run: |
|
|
npm run quickstart:barge
|
|
sleep 20
|
|
env:
|
|
ADDRESS_FILE: /home/runner/.ocean/ocean-contracts/artifacts/address.json
|
|
BARGE_FOLDER: /home/runner/.ocean/
|
|
- run: npm run test-integration
|
|
env:
|
|
ADDRESS_FILE: /home/runner/.ocean/ocean-contracts/artifacts/address.json
|
|
BARGE_FOLDER: /home/runner/.ocean/
|
|
- name: docker logs
|
|
run: docker logs ocean_graph-node_1
|
|
if: ${{ failure() }}
|