# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/VYk8Lw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment. https://hub.docker.com/r/dockunit/prebuilt-images/tags/
image: incsub/wp-test-env

pipelines:
  default:
    - step:
        script: # Modify the commands below to build your repository.
          - mkdir -p ~/.ssh
          - (umask  077 ; echo $PIPELINES_SSH_KEY | base64 --decode > ~/.ssh/id_rsa)
          - ssh-keyscan -t rsa -H bitbucket.org >> ~/.ssh/known_hosts
          - git submodule update --init --recursive
          - service mysql start
          - bash bin/install-wp-tests.sh wordpress_test root '' localhost latest
          - phpunit-multi 5.3,5.6,7.0 #runs phpunit against passed php versions (args can be added too)