Hi guys, Is that possible to be done in pipeline?On push we need to run phpunit and if the tests are failing we need to block the merge button.Below is my simple pipeline:
steps: - step: &build name: Build and run Composer runs-on: - 'self.hosted' - 'linux.arm64' - 'customlabel' script: - apt update - apt install -y list-of-packages - docker-php-ext-enable list-of-extensions - docker-php-ext-install list-of-extentions - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer - composer install - ./vendor/bin/phpstan - ./vendor/bin/phpunit - apt-get clean - rm -rf /var/lib/apt/lists/* /tmp/pear caches: - composer pipelines: branches: my-branch: - step: *build
Regards,
Hi @Ivo,
Yes, when your test fails and causes the pipeline to fail, it will mark the build as failed. You can define merge checks for passing builds.
We also provide an addon with build checks and additional merge checks not available on Bitbucket out of the box.
Thank you @Saxea _Flowie_
We know about the merge checks and the options but my colleagues are not able to merge:
The message is:
The following recommended pre-merge check did not pass:1+ approval from default reviewers
They selected from the merge settings
Minimum number of approvals 1
Minimum number of successful builds for the last commit with no failed builds and no in progress builds 1
Have you also selected 'Prevent a merge with unresolved merge checks'?
Hi @Saxea _Flowie_ ,No i haven't selected this option because this option is part of the Premium plan. You can see my configuration on the screenshot below.
It looks like you're new here. Sign in or register to get started.