2.14 PHP application testing example

You can run the tests for a PHP application.

Pipeline Configuration

---
resources:
- name: larvel-websockets-git
  type: git
  icon: github
  source:
    uri: https://github.com/beyondcode/laravel-websockets.git

jobs:
- name: test
  public: true
  plan:
  - get: larvel-websockets-git
    trigger: true
  - task: run-tests
    config:
      platform: linux
      image_resource:
        type: registry-image
        source: { repository: composer }
      inputs:
        - name: larvel-websockets-git
      run:
        path: /bin/sh
        args:
          - -c
          - |
            cd larvel-websockets-git

            composer install
            vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover

References