Add container build script and update workflow
Some checks failed
Tests / sdk_tests (pull_request) Failing after 5m32s

This commit is contained in:
Prathamesh Musale 2024-01-16 14:34:37 +05:30
parent 913389ab9f
commit e5900b2e4a
3 changed files with 47 additions and 82 deletions

View File

@ -25,57 +25,39 @@ jobs:
ref: main ref: main
- name: Environment - name: Environment
run: ls -tlh && env run: ls -tlh && env
- name: Start dockerd - name: Start dockerd
run: | run: |
dockerd -H $DOCKER_HOST --userland-proxy=false & dockerd -H $DOCKER_HOST --userland-proxy=false &
sleep 5 sleep 5
- name: build containers scripts
- name: Build laconicd container
working-directory: laconicd/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: ./build-laconicd-container.sh run: ./build-laconicd-container.sh
- name: build test-container - name: Build laconic-sdk container
run: docker build -t cerc-io/laconic-sdk-tester:local-test -f laconicd/tests/sdk_tests/Dockerfile-sdk . run: ./scripts/build-sdk-test-container.sh
- name: start containers
- name: Start containers
working-directory: laconicd/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: docker compose up -d run: docker compose up -d
- name: run basic tests - name: Run tests
working-directory: laconicd/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: | run: ./run-tests.sh
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 - name: Start containers (auctions enabled)
laconicd_rest_endpoint=http://laconicd:1317
laconicd_gql_endpoint=http://laconicd:9473/api
sleep 30s
docker compose exec sdk-test-runner sh -c "COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test"
- name: stop containers
working-directory: laconicd/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: docker compose down env:
- name: start auction containers TEST_AUCTION_ENABLED: true
run: docker compose up -d
- name: Run auction tests
working-directory: laconicd/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: docker compose -f docker-compose-auctions.yml up -d run: ./run-tests.sh test:auctions
- name: run auction tests
- name: Start containers (expiry enabled)
working-directory: laconicd/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: | env:
laconicd_key=$( docker compose exec laconicd echo y | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe ) TEST_REGISTRY_EXPIRY: true
cosmos_chain_id=laconic_9000-1 run: docker compose up -d
laconicd_rest_endpoint=http://laconicd:1317 - name: Run nameservice expiry tests
laconicd_gql_endpoint=http://laconicd:9473/api
sleep 30s
docker compose exec sdk-test-runner sh -c "COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test:auctions"
- name: start containers
working-directory: laconicd/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: docker compose down run: ./run-tests.sh test:nameservice-expiry
- name: start containers
working-directory: laconicd/tests/sdk_tests
run: docker compose -f docker-compose-nameservice.yml up -d
- name: run nameservice expiry tests
working-directory: laconicd/tests/sdk_tests
run: |
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
docker compose exec sdk-test-runner sh -c "COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test:nameservice-expiry"
- name: stop nameservice containers
working-directory: laconicd/tests/sdk_tests
run: docker compose down

View File

@ -20,53 +20,34 @@ jobs:
ref: main ref: main
- name: Environment - name: Environment
run: ls -tlh && env run: ls -tlh && env
- name: build containers scripts
- name: Build laconicd container
working-directory: laconicd/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: ./build-laconicd-container.sh run: ./build-laconicd-container.sh
- name: build test-container - name: Build laconic-sdk container
run: docker build -t cerc-io/laconic-sdk-tester:local-test -f laconicd/tests/sdk_tests/Dockerfile-sdk . run: ./scripts/build-sdk-test-container.sh
- name: start containers
- name: Start containers
working-directory: laconicd/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: docker compose up -d run: docker compose up -d
- name: run basic tests - name: Run tests
working-directory: laconicd/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: | run: ./run-tests.sh
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 - name: Start containers (auctions enabled)
laconicd_rest_endpoint=http://laconicd:1317
laconicd_gql_endpoint=http://laconicd:9473/api
sleep 30s
docker compose exec sdk-test-runner sh -c "COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test"
- name: stop containers
working-directory: laconicd/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: docker compose down env:
- name: start auction containers TEST_AUCTION_ENABLED: true
run: docker compose up -d
- name: Run auction tests
working-directory: laconicd/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: docker compose -f docker-compose-auctions.yml up -d run: ./run-tests.sh test:auctions
- name: run auction tests
- name: Start containers (expiry enabled)
working-directory: laconicd/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: | env:
laconicd_key=$( docker compose exec laconicd echo y | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe ) TEST_REGISTRY_EXPIRY: true
cosmos_chain_id=laconic_9000-1 run: docker compose up -d
laconicd_rest_endpoint=http://laconicd:1317 - name: Run nameservice expiry tests
laconicd_gql_endpoint=http://laconicd:9473/api
sleep 30s
docker compose exec sdk-test-runner sh -c "COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test:auctions"
- name: start containers
working-directory: laconicd/tests/sdk_tests working-directory: laconicd/tests/sdk_tests
run: docker compose down run: ./run-tests.sh test:nameservice-expiry
- name: start containers
working-directory: laconicd/tests/sdk_tests
run: docker compose -f docker-compose-nameservice.yml up -d
- name: run nameservice expiry tests
working-directory: laconicd/tests/sdk_tests
run: |
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
docker compose exec sdk-test-runner sh -c "COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test:nameservice-expiry"
- name: stop nameservice containers
working-directory: laconicd/tests/sdk_tests
run: docker compose down

View File

@ -0,0 +1,2 @@
#!/usr/bin/env bash
docker build -t cerc-io/laconic-sdk-tester:local -f Dockerfile .