|
| 1 | +name: Continuous Integration - E2E (Blockfrost Providers) |
| 2 | + |
| 3 | +env: |
| 4 | + TL_DEPTH: ${{ github.event.pull_request.head.repo.fork && '0' || fromJson(vars.TL_DEPTH) }} |
| 5 | + TL_LEVEL: ${{ github.event.pull_request.head.repo.fork && 'info' || vars.TL_LEVEL }} |
| 6 | + # ----------------------------------------------------------------------------------------- |
| 7 | + KEY_MANAGEMENT_PROVIDER: 'inMemory' |
| 8 | + KEY_MANAGEMENT_PARAMS: '{"bip32Ed25519": "Sodium", "accountIndex": 0, "chainId":{"networkId": 0, "networkMagic": 888}, "passphrase":"some_passphrase","mnemonic":"vacant violin soft weird deliver render brief always monitor general maid smart jelly core drastic erode echo there clump dizzy card filter option defense"}' |
| 9 | + TEST_CLIENT_ASSET_PROVIDER: 'http' |
| 10 | + TEST_CLIENT_ASSET_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:4014/"}' |
| 11 | + TEST_CLIENT_CHAIN_HISTORY_PROVIDER: 'http' |
| 12 | + TEST_CLIENT_CHAIN_HISTORY_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:4000/"}' |
| 13 | + DB_SYNC_CONNECTION_STRING: 'postgresql://postgres:doNoUseThisSecret!@localhost:5435/cexplorer' |
| 14 | + TEST_CLIENT_HANDLE_PROVIDER: 'http' |
| 15 | + TEST_CLIENT_HANDLE_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:4011/"}' |
| 16 | + STAKE_POOL_CONNECTION_STRING: 'postgresql://postgres:doNoUseThisSecret!@localhost:5435/stake_pool' |
| 17 | + STAKE_POOL_TEST_CONNECTION_STRING: 'postgresql://postgres:doNoUseThisSecret!@localhost:5435/stake_pool_test' |
| 18 | + TEST_CLIENT_NETWORK_INFO_PROVIDER: 'ws' |
| 19 | + TEST_CLIENT_NETWORK_INFO_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:4000/"}' |
| 20 | + OGMIOS_URL: 'ws://localhost:1340/' |
| 21 | + TEST_CLIENT_REWARDS_PROVIDER: 'http' |
| 22 | + TEST_CLIENT_REWARDS_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:4000/"}' |
| 23 | + TEST_CLIENT_TX_SUBMIT_PROVIDER: 'http' |
| 24 | + TEST_CLIENT_TX_SUBMIT_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:4000/"}' |
| 25 | + TEST_CLIENT_UTXO_PROVIDER: 'http' |
| 26 | + TEST_CLIENT_UTXO_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:4000/"}' |
| 27 | + TEST_CLIENT_STAKE_POOL_PROVIDER: 'http' |
| 28 | + TEST_CLIENT_STAKE_POOL_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:4000/"}' |
| 29 | + WS_PROVIDER_URL: 'http://localhost:4100/ws' |
| 30 | + # enable Blockfrost backed providers, the rest will use defaults |
| 31 | + ASSET_PROVIDER: 'blockfrost' |
| 32 | + UTXO_PROVIDER: 'blockfrost' |
| 33 | + CHAIN_HISTORY_PROVIDER: 'blockfrost' |
| 34 | + REWARDS_PROVIDER: 'blockfrost' |
| 35 | + NETWORK_INFO_PROVIDER: 'blockfrost' |
| 36 | + TX_SUBMIT_PROVIDER: 'blockfrost' |
| 37 | + |
| 38 | +on: |
| 39 | + pull_request: |
| 40 | + push: |
| 41 | + branches: ['master'] |
| 42 | + tags: ['*.*.*'] |
| 43 | + |
| 44 | +jobs: |
| 45 | + build_and_test: |
| 46 | + strategy: |
| 47 | + matrix: |
| 48 | + os: [ubuntu-20.04] |
| 49 | + runs-on: ${{ matrix.os }} |
| 50 | + steps: |
| 51 | + - name: 📥 Checkout repository |
| 52 | + uses: actions/checkout@v3 |
| 53 | + |
| 54 | + - name: 🧰 Setup Node.js |
| 55 | + uses: actions/setup-node@v3 |
| 56 | + with: |
| 57 | + node-version: 18.12.0 |
| 58 | + |
| 59 | + - name: 🔨 Build |
| 60 | + run: | |
| 61 | + yarn install --immutable --inline-builds --mode=skip-build |
| 62 | + yarn workspace @cardano-sdk/cardano-services-client build:cjs |
| 63 | + yarn workspace @cardano-sdk/cardano-services build:cjs |
| 64 | + yarn workspace @cardano-sdk/e2e build:cjs |
| 65 | + yarn workspace @cardano-sdk/util-dev build:cjs |
| 66 | + docker build --no-cache . |
| 67 | + env: |
| 68 | + NODE_OPTIONS: '--max_old_space_size=8192' |
| 69 | + |
| 70 | + - name: 🌐 Setup local test network |
| 71 | + working-directory: packages/e2e |
| 72 | + run: | |
| 73 | + yarn local-network:blockfrost:up -d |
| 74 | + env: |
| 75 | + CARDANO_NODE_CHAINDB_LOG_LEVEL: 'Warning' |
| 76 | + CARDANO_NODE_LOG_LEVEL: 'Warning' |
| 77 | + OGMIOS_PORT: '1340' |
| 78 | + OGMIOS_URL: 'ws://ogmios:1340' |
| 79 | + POSTGRES_PORT: '5435' |
| 80 | + |
| 81 | + - name: Wait for network init |
| 82 | + run: | |
| 83 | + yarn workspace @cardano-sdk/e2e wait-for-network-init |
| 84 | +
|
| 85 | + - name: 🔬 Test - e2e - wallet at epoch 0 |
| 86 | + run: | |
| 87 | + yarn workspace @cardano-sdk/e2e test:wallet:epoch0 |
| 88 | + yarn workspace @cardano-sdk/e2e test:projection |
| 89 | + yarn workspace @cardano-sdk/e2e test:ws |
| 90 | +
|
| 91 | + - name: Wait for epoch 3 |
| 92 | + run: | |
| 93 | + yarn workspace @cardano-sdk/e2e wait-for-network-epoch-3 |
| 94 | +
|
| 95 | + - name: 🔬 Test - e2e - wallet at epoch 3 |
| 96 | + run: | |
| 97 | + yarn workspace @cardano-sdk/e2e test:wallet:epoch3 |
| 98 | + yarn workspace @cardano-sdk/e2e test:pg-boss |
| 99 | + yarn workspace @cardano-sdk/e2e test:providers |
| 100 | + env: |
| 101 | + STAKE_POOL_PROVIDER_URL: 'http://localhost:4000/' |
| 102 | + |
| 103 | + - name: 🔬 Test - e2e - wallet - typeorm stake pool provider |
| 104 | + run: | |
| 105 | + yarn workspace @cardano-sdk/e2e test:providers -t StakePoolProvider |
| 106 | + env: |
| 107 | + STAKE_POOL_PROVIDER_URL: 'http://localhost:4010/' |
| 108 | + |
| 109 | + - name: Dump docker logs |
| 110 | + if: ${{ cancelled() || failure() }} |
| 111 | + uses: jwalton/gh-docker-logs@v2 |
0 commit comments