1

I have a repo with both front and backend application and i want to use scrutinizer to build and test my backend (PHP) application. How can i tell (or configure) scrutinizer to build and test my application in this subdirectory?

Here is the basic structure of my repo:

root
|__Api
|  |_src
|  |_composer.json
|  |_phpspec.yml
|  |_ ...
|
|__Front
   |_index.html
   |_api.php
   |_ ...

I would like to run composer install and phpspec in the Api directory.

Thank you, JM

jmleroux
  • 947
  • 6
  • 17

2 Answers2

2

Change the directory in your .scrutinizer.yml:

build:
    project_setup:
        before:
            - "cd Api"

https://scrutinizer-ci.com/docs/configuration/build#dependencies-project-setup

If you want to exclude frontend files from analysis, filter them out, e.g:

filter:
    paths: [Api/src/*]

https://scrutinizer-ci.com/docs/reviews/excluding_files_from_analysis

Alex Blex
  • 34,704
  • 7
  • 48
  • 75
0

This approach worked for me

build:
    root_path: 'app/'

But project_setup did not work for me.

Jake N
  • 10,535
  • 11
  • 66
  • 112