Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

services/horizon: Run integration tests nightly and include captive core #3114

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 36 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)<</ parameters.enable-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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May not be needed after #3106.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. For that we need to decide using Horizon #3106 for validation and not just local development.

<<# parameters.enable-captive-core >>HORIZON_INTEGRATION_ENABLE_CAPTIVE_CORE=true<</ parameters.enable-captive-core >> go test -timeout 20m -v ./services/horizon/internal/integration/...

#-----------------------------------------------------------------------------#
# Jobs use the commands to accomplish a given task, and run through workflows #
#-----------------------------------------------------------------------------#
Expand Down Expand Up @@ -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 #
#-------------------------------------------------------------------------#
Expand All @@ -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:
Expand Down Expand Up @@ -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