2023-02-03 19:59:25 +00:00
|
|
|
name: Tests
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- release/**
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
sdk_tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Checkout laconicd
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
path: "./laconicd/"
|
|
|
|
repository: cerc-io/laconicd
|
|
|
|
fetch-depth: 0
|
|
|
|
ref: main
|
|
|
|
- name: Environment
|
|
|
|
run: ls -tlh && env
|
|
|
|
- name: build containers scripts
|
|
|
|
working-directory: laconicd/tests/sdk_tests
|
|
|
|
run: ./build-laconicd-container.sh
|
2023-02-09 21:33:53 +00:00
|
|
|
- name: build test-container
|
|
|
|
run: docker build -t cerc-io/laconic-sdk-tester:local-test -f laconicd/tests/sdk_tests/Dockerfile-sdk .
|
2023-02-03 19:59:25 +00:00
|
|
|
- name: start containers
|
|
|
|
working-directory: laconicd/tests/sdk_tests
|
|
|
|
run: docker compose up -d laconicd
|
|
|
|
- name: run ALL tests
|
|
|
|
run: |
|
2023-02-03 21:04:00 +00:00
|
|
|
cd laconicd/tests/sdk_tests
|
2023-02-03 19:59:25 +00:00
|
|
|
laconicd_key=$( docker compose exec laconicd echo y | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe )
|
|
|
|
cosmos_chain_id=laconic_9000-1
|
|
|
|
laconicd_rest_endpoint=http://laconicd:1317
|
|
|
|
laconicd_gql_endpoint=http://laconicd:9473/api
|
|
|
|
sleep 30s
|
2023-02-03 21:04:00 +00:00
|
|
|
cd ../../../
|
2023-02-03 19:59:25 +00:00
|
|
|
COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test
|