Skip to content

issue 597: Rework unit-test for ExchangeConfigSuite #81

issue 597: Rework unit-test for ExchangeConfigSuite

issue 597: Rework unit-test for ExchangeConfigSuite #81

Workflow file for this run

name: exchange-unit-testing
on:
pull_request:
branches:
- master
- v2.122
- v2.110
- v2.87
# 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 "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
DEBIAN_FRONTEND: noninteractive
DOCKER_NETWORK: exchange-api-network
DOCKER_REGISTRY: openhorizon
EXCHANGE_DB_NAME: exchange
# ((Core Count * 2) + Spindle Count); Default is 20
EXCHANGE_DB_NUMTHREADS: 9
EXCHANGE_DB_PORT: 5432
EXCHANGE_DB_USER: admin
EXCHANGE_PEKKO_LOGLEVEL: debug
EXCHANGE_ROOT_PW: ci-password
GOPATH: /home/runner/work/anax/anax/go
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
- uses: coursier/cache-action@v6
# Setup Scala
# Comes from open source action: https://github.com/coursier/setup-action
- name: Setup Scala
uses: coursier/setup-action@v1
with:
jvm: adoptium:1.17
- name: Create Docker Env
run: |
pwd
java -version
make docker-network
docker run -d -e POSTGRES_HOST_AUTH_METHOD=trust -e POSTGRES_DB=$EXCHANGE_DB_NAME -e POSTGRES_USER=$EXCHANGE_DB_USER --network $DOCKER_NETWORK --name postgres postgres
export POSTGRES_CONTAINER_ADDRESS=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' postgres)
export EXCHANGE_DB_HOST=$POSTGRES_CONTAINER_ADDRESS
make run-docker
docker ps -a
docker network ls
make test