Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing nightly tests #614

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 44 additions & 38 deletions .github/workflows/testing-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,22 @@ on:
- cron: '30 5 * * *'

jobs:
unit-test:
unit-tests:
runs-on: ubuntu-latest

steps:
- name: Reclaim some disk space
run: docker system prune --all --volumes -f
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: |
yarn
- name: Run linters
run: yarn lint

- name: Start ganache
run: yarn ganache --port 18545 --chain.chainId 8998 &

- uses: actions/checkout@v3
with:
repository: nevermined-io/contracts
ref: 'main'
path: contracts
token: ${{ secrets.API_TOKEN_GITHUB }}
- uses: actions/setup-node@v3
with:
node-version: 18

- name: Deploy contracts
run: |
Expand All @@ -42,16 +35,27 @@ jobs:
cd ..
rm -rf contracts

- name: Install dependencies
run: |
yarn

- name: Start ganache
env:
SEED_WORDS: ${{ secrets.seedWords }}
run: yarn ganache --server.port 18545 --chain.chainId 8998 --wallet.mnemonic "$SEED_WORDS" --detach

- name: Run unit tests
env:
ETH_PORT: 18545
SEED_WORDS: ${{ secrets.seedWords }}
run: |
yarn test:all

subgraph-integration:
integration:
runs-on: ubuntu-latest
if: ${{ false }}
steps:
- name: Reclaim some disk space
run: docker system prune --all --volumes -f
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
Expand All @@ -62,7 +66,6 @@ jobs:
opengsn: 'true'
estuary: 'true'
compute: 'true'
# TODO: Update to tagged versions when everything is relased and in main branches
contracts-version: 'latest'
node-version: 'develop'

Expand All @@ -75,24 +78,19 @@ jobs:
nvm-tools copy-artifacts ./artifacts
ls -l artifacts

- name: Run subgraph integration tests
- name: Run integration tests
env:
SEED_WORDS: ${{ secrets.seedWords }}
INFURA_TOKEN: ${{ secrets.INFURA_TOKEN }}
run: |
export GRAPH_DELAY=true
npm run integration:subgraph

- name: Run compute integration tests
env:
SEED_WORDS: ${{ secrets.seedWords }}
NEVERMINED_NODE_URI: http://node.nevermined.localnet
WEB3_PROVIDER_URL: http://contracts.nevermined.localnet
run: |
yarn run integration:compute
IPFS_GATEWAY: https://ipfs.infura.io:5001
IPFS_PROJECT_ID: ${{ secrets.IPFS_PROJECT_ID }}
IPFS_PROJECT_SECRET: ${{ secrets.IPFS_PROJECT_SECRET }}
LOG_LEVEL: 1 # If LOG_LEVEL is >1 it will print the logger.debug calls
run: yarn integration:all

compute-integration:
subgraph-integration:
runs-on: ubuntu-latest
if: ${{ false }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -117,6 +115,14 @@ jobs:
nvm-tools copy-artifacts ./artifacts
ls -l artifacts

- name: Run subgraph integration tests
env:
SEED_WORDS: ${{ secrets.seedWords }}
INFURA_TOKEN: ${{ secrets.INFURA_TOKEN }}
run: |
export GRAPH_DELAY=true
npm run integration:subgraph

- name: Run compute integration tests
env:
SEED_WORDS: ${{ secrets.seedWords }}
Expand All @@ -125,8 +131,9 @@ jobs:
run: |
yarn run integration:compute

integration:
compute-integration:
runs-on: ubuntu-latest
if: ${{ false }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -151,18 +158,17 @@ jobs:
nvm-tools copy-artifacts ./artifacts
ls -l artifacts

- name: Run integration tests
- name: Run compute integration tests
env:
SEED_WORDS: ${{ secrets.seedWords }}
INFURA_TOKEN: ${{ secrets.INFURA_TOKEN }}
IPFS_GATEWAY: https://ipfs.infura.io:5001
IPFS_PROJECT_ID: ${{ secrets.IPFS_PROJECT_ID }}
IPFS_PROJECT_SECRET: ${{ secrets.IPFS_PROJECT_SECRET }}
LOG_LEVEL: 1 # If LOG_LEVEL is >1 it will print the logger.debug calls
run: yarn integration:all
NEVERMINED_NODE_URI: http://node.nevermined.localnet
WEB3_PROVIDER_URL: http://contracts.nevermined.localnet
run: |
yarn run integration:compute

mumbai-integration:
runs-on: ubuntu-latest
if: ${{ false }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down