diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9da02a2..28bc75f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,6 +16,23 @@ before_script: - gcloud auth list - gcloud --version +# Run tests +test_build: + stage: build + image: blockstream/satapi-builder@sha256:a3a137b80a08325bdd50a7c59ae0429b933e7a36db0d74f6ae34af067dfdee2d + only: + - branches@satellite/ionosphere + except: + - master@satellite/ionosphere + before_script: + - export CHARGE_ROOT=$CHARGE_ROOT_CI + - export REDIS_URI=$REDIS_URI_CI + script: + - bundle exec rake db:create && bundle exec rake db:schema:load && bundle exec rake db:migrate + - bundle exec ruby tests/tests.rb || { echo "Tests failed.."; exit 1; } + - echo "Tests passed!" + - sleep 5000 + # Run tests and build docker images build: stage: build