-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml.04
33 lines (29 loc) · 907 Bytes
/
.gitlab-ci.yml.04
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
stages:
- install
- test
- deploy
# Define PHP 5.6 environment
image: php:5.6-cli
# Install dependencies (Composer)
install_dependencies:
stage: install
script:
- apt-get update -y && apt-get install -y git unzip libpng-dev libjpeg-dev libfreetype6-dev libxml2-dev
- docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
- docker-php-ext-install gd
- curl -sS https://getcomposer.org/installer | php
- mv composer.phar /usr/local/bin/composer
- composer install
# Run tests (optional but highly recommended)
run_tests:
stage: test
script:
- composer require --dev phpunit/phpunit ^4.8
- vendor/bin/phpunit --configuration phpunit.xml
# Deploy stage (dummy example for production)
deploy:
stage: deploy
script:
- echo "Deploying application to production..."
only:
- main # Only deploy on the main branch