phpsess/sodium-encryption

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
language: php

php:
  - '7.1'
  - '7.2'
env:
  global:
  - CC_TEST_REPORTER_ID=647fb72a9c46c0a257f16377991f61d3e76c7f8da2fec0d85d683d8a6404d1ac
  - GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)

before_script:
  - >
    if [ "$TRAVIS_PHP_VERSION" == "7.1" ]; then
      sudo apt update &&
      sudo apt install build-essential git -y &&
      git clone -b stable https://github.com/jedisct1/libsodium.git &&
      cd libsodium &&
      sudo ./configure &&
      sudo make check &&
      sudo make install &&
      cd .. &&
      pecl install libsodium; fi
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
  - chmod +x ./cc-test-reporter
  - ./cc-test-reporter before-build

script:
  - composer install
  - composer build
  - >
    if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
      ./cc-test-reporter format-coverage build/coverage/clover.xml --input-type clover &&
      ./cc-test-reporter upload-coverage -r $CC_TEST_REPORTER_ID; fi