-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml.05
44 lines (40 loc) · 1.09 KB
/
.gitlab-ci.yml.05
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
stages:
- install
- test
- deploy
variables:
PHP_VERSION: "5.6"
# Install PHP dependencies using composer
install_dependencies:
image: php:5.6
stage: install
before_script:
- apt-get update && apt-get install -y libpng-dev libjpeg-dev libfreetype6-dev zip git
- 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
script:
- composer install
cache:
paths:
- vendor/
# Run tests
run_tests:
image: php:5.6
stage: test
before_script:
- apt-get update && apt-get install -y libpng-dev libjpeg-dev libfreetype6-dev zip git
- curl -sS https://getcomposer.org/installer | php
- mv composer.phar /usr/local/bin/composer
- composer install
script:
- phpunit tests
# Deployment (customize this as per your needs)
deploy:
stage: deploy
script:
- echo "Deploying to production server..."
# Deploy script can be added here, e.g., using SSH to transfer files
only:
- main