Browse Source

Add circleci tests

tor-relay
nicolas.dorier 5 years ago
parent
commit
a428d06473
No known key found for this signature in database GPG Key ID: 6618763EF09186FE
  1. 13
      .circleci/config.yml
  2. 8
      .circleci/test-connectivity.sh
  3. 20
      .circleci/test-install.sh

13
.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:

8
.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

20
.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
Loading…
Cancel
Save