diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index be8fb29c..188406fc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -76,6 +76,8 @@ test:php7.4: image: php:7.4 script: - vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clove --colors=never + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # We test PHP7.4 with multisite test:php7.4:multisite: @@ -84,12 +86,16 @@ test:php7.4:multisite: image: php:7.4 script: - vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clove --colors=never + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # We test PHP8 test:php8.0: image: php:8.0 script: - vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover --colors=never + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # We test PHP8 with multisite test:php8.0:multisite: @@ -98,12 +104,16 @@ test:php8.0:multisite: image: php:8.0 script: - vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clove --colors=never + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # We test PHP8.1 test:php8.1: image: php:8.1 script: - vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover --colors=never + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' # We test PHP8.1 with multisite test:php8.1:multisite: @@ -111,4 +121,6 @@ test:php8.1:multisite: WP_MULTISITE: "1" image: php:8.1 script: - - vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clove --colors=never \ No newline at end of file + - vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clove --colors=never + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' \ No newline at end of file