diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8cb81c8c..622574b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,10 +12,12 @@ jobs: strategy: matrix: otp: ['22.3', '21.3'] - test-type: [ 'regular' , 'integration' ] + test-type: [ 'regular', 'integration' ] runs-on: 'ubuntu-20.04' steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - uses: ErlGang/setup-erlang@v1.0.0 with: otp-version: ${{ matrix.otp }} @@ -23,3 +25,5 @@ jobs: run: make test - if: matrix.test-type == 'integration' run: make integration_test + env: + TRAVIS_OTP_RELEASE: ${{ matrix.otp }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f33ede6b..00000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -os: linux -dist: xenial - -language: erlang - -otp_release: - - 22.3 - - 21.3 - -env: - - TEST_MODE=regular - - TEST_MODE=integration - -branches: - only: - - master - -script: - - if [ 'regular' = $TEST_MODE ]; then make test; fi - - if [ 'integration' = $TEST_MODE ]; then make integration_test; fi - -cache: - directories: - - $HOME/.cache/rebar3 diff --git a/README.md b/README.md index 7dedd437..1fafa0ce 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# A Murder of Crows [![Build Status](https://travis-ci.org/esl/amoc.svg?branch=master)](https://travis-ci.org/esl/amoc) +# A Murder of Crows [![](https://github.com/esl/amoc/workflows/CI/badge.svg)](https://github.com/esl/amoc/actions?query=workflow%3ACI) ---------------------------------------------------------------------------------------------- A Murder of Crows, aka amoc, is a simple framework for running massively parallel tests in a distributed environment. diff --git a/integration_test/helper.sh b/integration_test/helper.sh index 0d6a27d7..6e8daef3 100644 --- a/integration_test/helper.sh +++ b/integration_test/helper.sh @@ -44,7 +44,7 @@ function start_graphite_container() { function amoc_container_port() { local container="$1" if [[ "$container" =~ ^amoc-[0-9]$ ]]; then - echo "808${container#amoc-}" + echo "888${container#amoc-}" else return 1 fi @@ -54,7 +54,7 @@ function start_amoc_container() { local name="$1" shift 1 local port="$(amoc_container_port "$name")" - docker run --rm -t -d --name "$name" -h "$name" \ + docker run --rm -d --name "$name" -h "$name" \ --network "$docker_network" \ -e AMOC_GRAPHITE_HOST='"graphite"' \ --health-cmd="/home/amoc/amoc/bin/amoc status" \ @@ -67,7 +67,7 @@ function amoc_eval() { local exec_path="/home/amoc/amoc/bin/amoc" local container="$1" shift 1 - docker exec -it "$container" "$exec_path" eval "$@" + docker exec "$container" "$exec_path" eval "$@" } function get_health_status() { @@ -75,7 +75,9 @@ function get_health_status() { } function container_is_healthy() { - [ "$(get_health_status "$1")" = "\"healthy\"" ] + local health_status="$(get_health_status "$1")" + #echo "$1 container health status == '${health_status}'" + [ "$health_status" = "\"healthy\"" ] } function wait_for_healthcheck() { @@ -111,6 +113,12 @@ function wait_for_cmd() { return 1 } +function get_amoc_logs() { + local logs_path="/home/amoc/amoc/log/erlang.log" + local container="$1" + docker exec "$container" cat "$logs_path" +} + ###################### ## common variables ## ###################### diff --git a/integration_test/test_add_new_node.sh b/integration_test/test_add_new_node.sh index d774bd49..b24a0429 100755 --- a/integration_test/test_add_new_node.sh +++ b/integration_test/test_add_new_node.sh @@ -9,4 +9,4 @@ wait_for_healthcheck amoc-4 amoc_eval amoc-4 "amoc_controller:get_status()" | contain dummy_scenario running amoc_eval amoc-4 "amoc_config:get(test)" | contain "test_value" -amoc_eval amoc-4 "dummy_helper:test_amoc_dist()" | tee /dev/tty | contain 'amoc_dist_works_as_expected' +amoc_eval amoc-4 "dummy_helper:test_amoc_dist()" | contain 'amoc_dist_works_as_expected'