diff --git a/.circleci/config.yml b/.circleci/config.yml index f440ce8c06..f26c438211 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -212,6 +212,22 @@ commands: name: Send report to codecov.io command: bash <(curl -s https://codecov.io/bash) + # run_horizon_integration_tests runs Horizon's integration tests + run_horizon_integration_tests: + parameters: + enable-captive-core: + type: boolean + default: false + steps: + - run: + name: Run Horizon integration tests <<# parameters.enable-captive-core >>(With captive core)<> + # Currently all integration tests are in a single directory. + # Pulling the image helps with test running time + command: | + cd ~/go/src/github.com/stellar/go + docker pull stellar/quickstart:testing + <<# parameters.enable-captive-core >>HORIZON_INTEGRATION_ENABLE_CAPTIVE_CORE=true<> go test -timeout 20m -v ./services/horizon/internal/integration/... + #-----------------------------------------------------------------------------# # Jobs use the commands to accomplish a given task, and run through workflows # #-----------------------------------------------------------------------------# @@ -401,14 +417,12 @@ jobs: echo "export HORIZON_BIN_DIR=~/go/src/github.com/stellar/go" >> $BASH_ENV - install_golang - build_horizon - - run: - name: Run Horizon integration tests only - # Currently all integration tests are in a single directory. - # Pulling the image helps with test running time - command: | - cd ~/go/src/github.com/stellar/go - docker pull stellar/quickstart:testing - go test -timeout 20m -v ./services/horizon/internal/integration/... + # run the integration tests ... + # ... without captive core + - run_horizon_integration_tests + # ... and with captive core + - run_horizon_integration_tests: + enable-captive-core: true #-------------------------------------------------------------------------# # Workflows orchestrate jobs and make sure they run in the right sequence # #-------------------------------------------------------------------------# @@ -423,6 +437,7 @@ workflows: - test_code_1_14_postgres10 - test_code_1_15 - test_code_1_15_postgres10 + # TODO: remove once integration_tests_nightly is confirmed to be working - test_horizon_integration - publish_state_diff_docker_image: filters: @@ -462,3 +477,16 @@ workflows: # Pushing stellar/horizon:latest to docker hub requires manual approval requires: - hold + + integration_tests_nightly: + triggers: + - schedule: + # Every day + cron: "0 0 * * *" + filters: + branches: + only: + - master + - /release-horizon-/ + jobs: + - test_horizon_integration