Skip to content

Merge pull request #527 from umbrella-network/hotfix/8.6.13 #4316

Merge pull request #527 from umbrella-network/hotfix/8.6.13

Merge pull request #527 from umbrella-network/hotfix/8.6.13 #4316

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: tests
env:
NODE_ENV: testing
# Controls when the action will run.
on:
push:
branches:
- main
- develop
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called tests, which runs unit and E2E tests
tests:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v1
with:
node-version: 18
- name: Install dependencies
run: npm install
- name: Start MongoDB
uses: supercharge/[email protected]
- name: Start Redis
uses: supercharge/[email protected]
- name: Create .testing.env for unit tests
run: |
echo -n "" > ./.testing.env;
echo "MONGODB_URL=mongodb://localhost:27017/pegasus-test" >> ./.testing.env;
echo "REDIS_URL=redis://localhost:6379" >> ./.testing.env;
echo "FEEDS_CACHE_REFRESH_CRON_RULE=''" >> ./.testing.env;
- name: Run unit tests
env:
MONGODB_URL: "mongodb://localhost:27017/pegasus-test"
REDIS_URL: "redis://localhost:6379"
FEEDS_CACHE_REFRESH_CRON_RULE: ""
NEW_RELIC_ENABLED: "false"
VALIDATOR_PRIVATE_KEY: ${{ secrets.VALIDATOR_PRIVATE_KEY }}
DEVIATION_PRIVATE_KEY: ${{ secrets.VALIDATOR_PRIVATE_KEY }}
REGISTRY_CONTRACT_ADDRESS: "0x8f98d3B5C911206C1Ac08B9938875620A03BCd59"
BLOCKCHAIN_PROVIDER_URL: ${{ secrets.BLOCKCHAIN_PROVIDER_URL }}
OPTIONS_PRICE_API_KEY: ${{ secrets.OPTIONS_PRICE_API_KEY }}
CRYPTOCOMPARE_API_KEY: ${{ secrets.CRYPTOCOMPARE_API_KEY }}
POLYGON_IO_API_KEY: ${{ secrets.POLYGON_IO_API_KEY }}
IEX_API_KEY: ${{ secrets.IEX_API_KEY }}
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
COINMARKETCAP_API_KEY: ""
AVALANCHE_REGISTRY_CONTRACT_ADDRESS: ${{ vars.AVALANCHE_REGISTRY_CONTRACT_ADDRESS }}
AVALANCHE_BLOCKCHAIN_PROVIDER_URL: ${{ vars.AVALANCHE_BLOCKCHAIN_PROVIDER_URL }}
MULTIVERSX_REGISTRY_CONTRACT_ADDRESS: ${{ vars.MULTIVERSX_REGISTRY_CONTRACT_ADDRESS }}
MULTIVERSX_BLOCKCHAIN_PROVIDER_URL: ${{ vars.MULTIVERSX_BLOCKCHAIN_PROVIDER_URL }}
MULTIVERSX_SIGNING_PRIVATE_KEY: ${{ secrets.MULTIVERSX_SIGNING_PRIVATE_KEY }}
MULTIVERSX_DEVIATION_PRIVATE_KEY: ${{ secrets.MULTIVERSX_SIGNING_PRIVATE_KEY }}
run: npm run test
remote_tests:
runs-on: ubuntu-latest
needs: tests
if: github.ref == 'refs/heads/develop'
steps:
- name: Call Reff App Test for Develop
run: |
curl -X POST https://api.github.com/repos/umbrella-network/babel/dispatches \
-H 'Accept: application/vnd.github.v3+json' \
-u 'umb-dev:${{ secrets.BOT_GITHUB_TOKEN }}' \
--data '{"event_type": "Reff_App_Test_Develop", "client_payload": { "repository": "'"$GITHUB_REPOSITORY"'" }}'
- name: Call SDK Test for Develop
run: |
curl -X POST https://api.github.com/repos/umbrella-network/canvas/dispatches \
-H 'Accept: application/vnd.github.v3+json' \
-u 'umb-dev:${{ secrets.BOT_GITHUB_TOKEN }}' \
--data '{"event_type": "SDK_Test_Develop", "client_payload": { "repository": "'"$GITHUB_REPOSITORY"'" }}'