Skip to content

Revert changes on continuous-integration-e2e.yaml; create new workflo… #1

Revert changes on continuous-integration-e2e.yaml; create new workflo…

Revert changes on continuous-integration-e2e.yaml; create new workflo… #1

name: Continuous Integration - E2E
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to run e2e tests against'
type: choice
required: true
default: 'dev-preprod'
options:
- dev-mainnet
- dev-preprod
- dev-preview
- staging-preprod
env:
TL_DEPTH: ${{ github.event.pull_request.head.repo.fork && '0' || fromJson(vars.TL_DEPTH) }}
TL_LEVEL: ${{ github.event.pull_request.head.repo.fork && 'info' || vars.TL_LEVEL }}
# -----------------------------------------------------------------------------------------
on:

Check failure on line 23 in .github/workflows/test-deploy-e2e.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/test-deploy-e2e.yaml

Invalid workflow file

You have an error in your yaml syntax on line 23
pull_request:
push:
branches: ['master']
tags: ['*.*.*']
jobs:
build_and_test:
strategy:
matrix:
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v3
inputs:
network:
description: "Network to update (dev-mainnet, dev-preprod, etc.)"
required: true
type: string
- name: Generate .env file
working-directory: ./packages/e2e/
run: |
mnemonics=${{ secrets.mnemonics }}
networkMagic=$(jq <<< '{"dev-preprod":1, "dev-preview":2, "dev-mainnet":764824073, "staging-preprod":1}' .${{ inputs.environment }})
./src/scripts/generate-network-dotenv.sh ${{ github.event.inputs.network }}
echo "KEY_MANAGEMENT_PARAMS='$(jq --argjson networkMagic $networkMagic --arg mnemonic "${{ secrets.mnemonic }}" <<< '{"bip32Ed25519": "Sodium", "accountIndex": 0, "chainId":{"networkId": 0, "networkMagic": 0}, "passphrase":"some_passphrase","mnemonic":"mnemonics"}' '.mnemonic=$mnemonic | .chainId.networkMagic=$networkMagic')'" >> .env
- name: 🧰 Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.12.0
- name: 🔨 Build
run: |
source .env
yarn install --immutable --inline-builds --mode=skip-build
yarn build:cjs
docker build --no-cache .
env:
NODE_OPTIONS: '--max_old_space_size=8192'
- name: 🌐 Setup local test network
working-directory: packages/e2e
run: |
source .env
yarn local-network:up -d
env:
CARDANO_NODE_CHAINDB_LOG_LEVEL: 'Warning'
CARDANO_NODE_LOG_LEVEL: 'Warning'
OGMIOS_PORT: '1340'
OGMIOS_URL: 'ws://ogmios:1340'
POSTGRES_PORT: '5435'
- name: Wait for network init
run: |
source .env
yarn workspace @cardano-sdk/e2e wait-for-network-init
- name: 🔬 Test - e2e - wallet at epoch 0
run: |
source .env
yarn workspace @cardano-sdk/e2e test:wallet:epoch0
yarn workspace @cardano-sdk/e2e test:projection
- name: Wait for epoch 3
run: |
source .env
yarn workspace @cardano-sdk/e2e wait-for-network-epoch-3
- name: 🔬 Test - e2e - wallet at epoch 3
run: |
source .env
yarn workspace @cardano-sdk/e2e test:wallet:epoch3
yarn workspace @cardano-sdk/e2e test:pg-boss
yarn workspace @cardano-sdk/e2e test:providers
env:
STAKE_POOL_PROVIDER_URL: 'http://localhost:4000/'
- name: 🔬 Test - e2e - wallet - typeorm stake pool provider
run: |
source .env
yarn workspace @cardano-sdk/e2e test:providers -t StakePoolProvider
env:
STAKE_POOL_PROVIDER_URL: 'http://localhost:4010/'
- name: Dump docker logs
if: ${{ cancelled() || failure() }}
uses: jwalton/gh-docker-logs@v2