mariusz-kraj/gitlab-reporter

Simple package for reporting bugs results to the Gitlab.com merge request in form of the comments

0.0.13 2018-02-01 17:24 UTC

This package is not auto-updated.

Last update: 2024-04-14 01:52:07 UTC


README

Instalation

  1. Install from composer
composer require --dev "mariusz-kraj/gitlab-reporter:*"
  1. Add config file ".gitlab-ci-reporter.yml" in the root of your project:
reporters:
    phpunit:
        path: 'tests/_output/report.xml'
        failIfNotFound: true
    phpcs:
        path: 'build/phpcs.xml'
        failIfNotFound: true
    phpmd:
        path: 'build/phpmd.xml'
        failIfNotFound: true
  1. Add 'after_' to your "gitlab-ci.yml":
after_script:
  - bin/gitlab-reporter publish
  1. Generate access code and add secret variable

    1. Go to access token
    2. Give access to API
    3. Copy token
    4. Go to the Project > Settings > CI\CD > Secret Variables
    5. Create ACCESS TOKEN variable with the token as a value
  2. Create a new merge request and wait for comments!

To Do

  • Tests
  • Documentation
  • Config validation
  • PHPUnit Coverage reports
  • Comments with attachments
  • Changing state of merge request depending on the reports
  • Instructions for contributors

Limitations

  • Gitlab CI doesn't have environmental variable with merge request id,library is searching for MR from current branch. If there would be more than one MR from one branch (why?) it will take the first one and ignore rest