-
Notifications
You must be signed in to change notification settings - Fork 30
49 lines (44 loc) · 1.57 KB
/
run-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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:
GOPATH: /home/runner/work/anax/anax/go
DEBIAN_FRONTEND: noninteractive
DOCKER_NETWORK: exchange-api-network
DOCKER_REGISTRY: openhorizon
EXCHANGE_FE_HEADER: issuer
EXCHANGE_PEKKO_LOGLEVEL: debug
EXCHANGE_ROOTPW: ci-password
POSTGRES_DB_NAME: exchange
POSTGRES_DB_PORT: 5432
POSTGRES_DB_USER: admin
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
# Setup Scala
# Comes from open source action: https://github.com/coursier/setup-action
- name: Setup Scala
uses: coursier/setup-action@v1
- name: Create Docker Env
run: |
pwd
java -version
make docker-network
docker run -d -e POSTGRES_HOST_AUTH_METHOD=trust -e POSTGRES_DB=$POSTGRES_DB_NAME -e POSTGRES_USER=$POSTGRES_DB_USER --network $DOCKER_NETWORK --name postgres postgres
export POSTGRES_CONTAINER_ADDRESS=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' postgres)
make run-docker
cat /etc/horizon/exchange/config-http.json
docker ps -a
docker network ls
make test