2021-04-13 17:10:03 +02:00
|
|
|
name: 'Integration tests'
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- '**'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '**'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
2021-08-03 14:16:02 +02:00
|
|
|
strategy:
|
|
|
|
max-parallel: 1
|
2021-04-13 17:10:03 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup Node.js
|
2021-08-03 14:16:02 +02: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'
|
2021-04-13 17:10:03 +02: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
|
2021-08-03 14:16:02 +02:00
|
|
|
key: ${{ runner.os }}-lint-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
restore-keys: ${{ runner.os }}-lint-${{ env.cache-name }}-
|
|
|
|
|
2021-04-13 17:10:03 +02:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
name: Checkout Barge
|
|
|
|
with:
|
2021-08-03 14:16:02 +02:00
|
|
|
repository: 'oceanprotocol/barge'
|
2021-04-13 17:10:03 +02:00
|
|
|
path: 'barge'
|
|
|
|
- run: npm ci
|
|
|
|
- name: Run Barge
|
|
|
|
working-directory: ${{ github.workspace }}/barge
|
|
|
|
env:
|
|
|
|
ADDRESS_FILE: ${HOME}/.ocean/ocean-contracts/artifacts/address.json
|
|
|
|
run: |
|
|
|
|
bash -x start_ocean.sh --with-thegraph --no-dashboard 2>&1 > start_ocean.log &
|
2021-08-03 14:16:02 +02:00
|
|
|
for i in $(seq 1 1500); do
|
2021-04-13 17:10:03 +02:00
|
|
|
sleep 5
|
|
|
|
[ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" ] && break
|
|
|
|
done
|
2021-08-03 14:16:02 +02:00
|
|
|
cat "$HOME/.ocean/ocean-contracts/artifacts/address.json"
|
2021-04-13 17:10:03 +02:00
|
|
|
- run: npm run bargesetup
|
|
|
|
env:
|
|
|
|
ADDRESS_FILE: /home/runner/.ocean/ocean-contracts/artifacts/address.json
|
2021-08-03 14:16:02 +02:00
|
|
|
- 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
|
2021-04-13 17:10:03 +02:00
|
|
|
- run: npm run test-integration
|
|
|
|
env:
|
|
|
|
ADDRESS_FILE: /home/runner/.ocean/ocean-contracts/artifacts/address.json
|