diff --git a/.github/workflows/testing-nightly.yml b/.github/workflows/testing-nightly.yml index 220c7c69e..00d78913a 100644 --- a/.github/workflows/testing-nightly.yml +++ b/.github/workflows/testing-nightly.yml @@ -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: | @@ -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: @@ -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' @@ -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 @@ -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 }} @@ -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 @@ -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