sudo: required
dist: trusty

services:
  - docker

matrix:
  fast_finish: true
  include:
    - env: DIR=5.6
    - env: DIR=7.0
    - env: DIR=7.1

before_script:
  - docker build --rm --tag herloct/composer:$TRAVIS_BRANCH-$DIR $DIR
  - docker run --rm herloct/composer:$TRAVIS_BRANCH-$DIR
  - rm -rf tests

script:
  - mkdir tests tests/composer
  - cd tests
  - docker run --rm --user $(id -u):$(id -g) --volume $(pwd):/project --volume composer:/composer/cache herloct/composer:$TRAVIS_BRANCH-$DIR require slim/slim --ignore-platform-reqs
  - ls -la .
  - if [[ ! -f "composer.json" ]]; then exit 1; fi
  - if [[ ! -f "composer.lock" ]]; then exit 1; fi
  - ls -la composer
  - if [[ ! -d "composer/files/slim" ]]; then exit 1; fi

sudo: required
dist: trusty

services:
  - docker

matrix:
  fast_finish: true
  include:
    - env: DIR=5.6
    - env: DIR=7.0
    - env: DIR=7.1

before_script:
  - docker build --rm --tag herloct/composer:$TRAVIS_BRANCH-$DIR $DIR
  - docker run --rm herloct/composer:$TRAVIS_BRANCH-$DIR
  - rm -rf tests

script:
  - mkdir tests tests/composer
  - cd tests
  - docker run --rm --user $(id -u):$(id -g) --volume $(pwd):/project --volume $(pwd)/composer:/composer/cache herloct/composer:$TRAVIS_BRANCH-$DIR require slim/slim --ignore-platform-reqs
  - ls -la .
  - if [[ ! -f "composer.json" ]]; then exit 1; fi
  - if [[ ! -f "composer.lock" ]]; then exit 1; fi
  - ls -la composer
  - if [[ ! -d "composer/files/slim" ]]; then exit 1; fi

Add `$(pwd)` on composer dir.
Add `$(pwd)` on composer dir.
