Commit e805d5ff authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

fix(phpunit): remove variable from rules:exists expression (unsupported)

parent 0a82bf13
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ It uses the following variable:
| Name                  | description                              | default value     |
| --------------------- | ---------------------------------------- | ----------------- |
| `PHP_UNIT_ARGS`       | Additional PHPUnit [options](https://phpunit.readthedocs.io/en/latest/textui.html#command-line-options) | _none_ |
| `PHP_UNIT_DISABLED`   | Set to disable PHPUnit test (if some `phpunit.xml` or `phpunit.xml.dist` file unintentionally triggers the build) | _none_ (auto based on presence of `phpunit.xml` or `phpunit.xml.dist` file) |

This job:

+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
      "id": "phpunit",
      "name": "PHPUnit",
      "description": "[PHPUnit](https://phpunit.readthedocs.io/) tests\n\nAutomatically enabled if a PHPUnit [XML configuration file](https://phpunit.readthedocs.io/en/latest/configuration.html#appendixes-configuration) is found in the project (`phpunit.xml`)",
      "disable_with": "PHP_UNIT_DISABLED",
      "variables": [
        {
          "name": "PHP_UNIT_ARGS",
+6 −3
Original line number Diff line number Diff line
@@ -202,7 +202,7 @@ stages:
    then
      ./bin/phpunit "$@"
    else
      log_error "phpunit not found: add it as a projet requirement (\\e[33;1mcomposer require --dev phpunit/phpunit\\e[0m)"
      log_error "phpunit not found: add it as a project requirement (\\e[33;1mcomposer require --dev phpunit/phpunit\\e[0m)"
      exit 1
    fi
  }
@@ -283,12 +283,15 @@ php-unit:
      - $PHP_PROJECT_DIR/reports/
  rules:
    # exclude merge requests
    - if: $CI_MERGE_REQUEST_ID
      when: never
    - if: $CI_MERGE_REQUEST_ID
      when: never
    # run if PHPUnit config file exists
    # /!\ variables can't be used in rules:exists
    - exists:
        - "$PHP_PROJECT_DIR/phpunit.xml"
        - "$PHP_PROJECT_DIR/phpunit.xml.dist"
        - "**/phpunit.xml"
        - "**/phpunit.xml.dist"

php-codesniffer:
  stage: test