-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yml
49 lines (47 loc) · 1.65 KB
/
bitbucket-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
image: php:7.4-fpm
definitions:
caches:
vendor-directory: vendor
steps:
# - step: &install-php-extensions
# name: Install PHP Extensions
# script:
# # Installing first the libraries necessary to configure and install gd
# - apt-get update && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev
# # Now we can configure and install the extension
# - docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/
# - docker-php-ext-install -j$(nproc) gd
- step: &install-composer
name: Install dependencies
artifacts:
- "vendor/**"
caches:
- composer # See https://confluence.atlassian.com/bitbucket/caching-dependencies-895552876.html
script:
- apt-get update && apt-get install -y unzip
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install --no-interaction --no-progress --prefer-dist --ignore-platform-reqs --optimize-autoloader
services:
- docker
- step: &run-tests
name: Run the tests
script:
- ./vendor/bin/phpunit --testsuite "Unit Test Suite"
services:
- docker
pipelines:
branches:
"{master,develop}":
# - step: *install-php-extensions
- step: *install-composer
- step: *run-tests
custom:
manually:
# - step: *install-php-extensions
- step: *install-composer
- step: *run-tests
pull-requests:
'**':
# - step: *install-php-extensions
- step: *install-composer
- step: *run-tests