diff --git a/.circleci/config.yml b/.circleci/config.yml index 4d7f774..ffbea1e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,14 @@ version: 2 jobs: + cansetup: + machine: + docker_layer_caching: true + steps: + - checkout + - run: + command: | + cd .circleci + sudo test-install.sh # Define in CircleCi Project Variables: $DOCKERHUB_REPO, $DOCKERHUB_USER, $DOCKERHUB_PASS # Publish jobs require those variables amd64: @@ -63,6 +72,10 @@ workflows: version: 2 publish: jobs: + - cansetup: + filters: + branches: + only: master - amd64: filters: branches: diff --git a/.circleci/test-connectivity.sh b/.circleci/test-connectivity.sh new file mode 100755 index 0000000..a762ac9 --- /dev/null +++ b/.circleci/test-connectivity.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +while true; do + if curl -sL -w "%{http_code}\\n" "http://localhost/" -o /dev/null > /dev/null; then + break + fi + sleep 1 +done \ No newline at end of file diff --git a/.circleci/test-install.sh b/.circleci/test-install.sh new file mode 100755 index 0000000..0f7caa6 --- /dev/null +++ b/.circleci/test-install.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -e + +cd .. + +export BTCPAY_HOST="btcpay.example.local" +export NBITCOIN_NETWORK="mainnet" +export BTCPAYGEN_CRYPTO1="btc" +export BTCPAYGEN_CRYPTO2="ltc" +export BTCPAYGEN_REVERSEPROXY="nginx" +export BTCPAYGEN_LIGHTNING="clightning" +source ./btcpay-setup.sh -i + +timeout 10m bash test-connectivity.sh + +# Testing scripts are not crashing and installed +btcpay-up.sh +btcpay-update.sh +btcpay-down.sh \ No newline at end of file