mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
61466749e0
* 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>
65 lines
1.8 KiB
YAML
65 lines
1.8 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
|
|
|
|
- name: Setup Node.js
|
|
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 }}-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'
|
|
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 &
|
|
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
|
|
- 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
|