You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.9 KiB

8 years ago
8 years ago
8 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. language: shell
  2. sudo: required
  3. dist: trusty
  4. os:
  5. - linux
  6. - osx
  7. services:
  8. - docker
  9. env:
  10. global:
  11. - SHFMT_URL=https://github.com/mvdan/sh/releases/download/v0.4.0/shfmt_v0.4.0_linux_amd64
  12. addons:
  13. apt:
  14. sources:
  15. - debian-sid # Grab shellcheck from the Debian repo (o_O)
  16. packages:
  17. - shellcheck
  18. install:
  19. - if [ "$TRAVIS_OS_NAME" = 'osx' ]; then
  20. brew update && brew install openssl socat;
  21. brew info openssl;
  22. ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/;
  23. ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/;
  24. ln -s /usr/local/Cellar/openssl/1.0.2j/bin/openssl /usr/local/openssl;
  25. _old_path="$PATH";
  26. echo "PATH=$PATH";
  27. export PATH="";
  28. export ACME_OPENSSL_BIN="/usr/local/openssl";
  29. openssl version 2>&1 || true;
  30. $ACME_OPENSSL_BIN version 2>&1 || true;
  31. export PATH="$_old_path";
  32. fi
  33. script:
  34. - echo "NGROK_TOKEN=$(echo "$NGROK_TOKEN" | wc -c)"
  35. - command -V openssl && openssl version
  36. - if [ "$TRAVIS_OS_NAME" = "linux" ]; then curl -sSL $SHFMT_URL -o ~/shfmt ; fi
  37. - if [ "$TRAVIS_OS_NAME" = "linux" ]; then chmod +x ~/shfmt ; fi
  38. - if [ "$TRAVIS_OS_NAME" = "linux" ]; then ~/shfmt -l -w -i 2 . ; fi
  39. - if [ "$TRAVIS_OS_NAME" = "linux" ]; then git diff --exit-code && echo "shfmt OK" ; fi
  40. - if [ "$TRAVIS_OS_NAME" = "linux" ]; then shellcheck -V ; fi
  41. - if [ "$TRAVIS_OS_NAME" = "linux" ]; then shellcheck -e SC2181 **/*.sh && echo "shellcheck OK" ; fi
  42. - cd ..
  43. - git clone https://github.com/Neilpang/acmetest.git && cp -r acme.sh acmetest/ && cd acmetest
  44. - if [ "$TRAVIS_OS_NAME" = "linux" -a "$NGROK_TOKEN" ]; then sudo TEST_LOCAL="$TEST_LOCAL" NGROK_TOKEN="$NGROK_TOKEN" ./rundocker.sh testplat ubuntu:latest ; fi
  45. - if [ "$TRAVIS_OS_NAME" = "osx" -a "$NGROK_TOKEN" ]; then sudo TEST_LOCAL="$TEST_LOCAL" NGROK_TOKEN="$NGROK_TOKEN" ACME_OPENSSL_BIN="$ACME_OPENSSL_BIN" ./letest.sh ; fi
  46. matrix:
  47. fast_finish: true