Skip to content

Tests Nightly

Tests Nightly #780

name: Tests Nightly
on:
schedule:
- cron: '30 5 * * *'
jobs:
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/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: |
cd contracts
yarn
export TESTNET=true
export NETWORK=external
./scripts/build-circuit.sh
yarn deploy
mv artifacts ..
mv circuits ..
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
integration:
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
- uses: nevermined-io/nvm-tools-actions@v0.15.0
with:
token: ${{ secrets.API_TOKEN_GITHUB }}
opengsn: 'true'
estuary: 'true'
compute: 'true'
contracts-version: 'latest'
node-version: 'develop'
- name: Install dependencies
run: |
yarn
- name: Check artifacts
run: |
nvm-tools copy-artifacts ./artifacts
ls -l artifacts
- name: Run 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
subgraph-integration:
runs-on: ubuntu-latest
if: ${{ false }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: nevermined-io/nvm-tools-actions@v0.15.0
with:
token: ${{ secrets.API_TOKEN_GITHUB }}
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'
- name: Install dependencies
run: |
yarn
- name: Check artifacts
run: |
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 }}
NEVERMINED_NODE_URI: http://node.nevermined.localnet
WEB3_PROVIDER_URL: http://contracts.nevermined.localnet
run: |
yarn run integration:compute
compute-integration:
runs-on: ubuntu-latest
if: ${{ false }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: nevermined-io/nvm-tools-actions@v0.15.0
with:
token: ${{ secrets.API_TOKEN_GITHUB }}
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'
- name: Install dependencies
run: |
yarn
- name: Check artifacts
run: |
nvm-tools copy-artifacts ./artifacts
ls -l artifacts
- 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
mumbai-integration:
runs-on: ubuntu-latest
if: ${{ false }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: |
yarn
- name: Download artifacts
run: |
mkdir -p node_modules/@nevermined-io/contracts/artifacts
yarn artifacts:download v3.2.1 mumbai public
ls -l node_modules/@nevermined-io/contracts/artifacts
- name: Run nightly tests
env:
SEED_WORDS: ${{ secrets.TEST_MNEMONIC_NIGHTLY }}
INFURA_TOKEN: ${{ secrets.INFURA_TOKEN }}
IPFS_GATEWAY: https://ipfs.infura.io:5001
GRAPH_DELAY: 'true'
IPFS_PROJECT_ID: ${{ secrets.IPFS_PROJECT_ID }}
IPFS_PROJECT_SECRET: ${{ secrets.IPFS_PROJECT_SECRET }}
run: |
yarn integration:e2e:mumbai