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.

53 lines
1.8 KiB

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