-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
51 lines (44 loc) · 1.21 KB
/
.gitlab-ci.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
50
51
# Select image from https://hub.docker.com/_/php/
image: php:7.2
# Include gitlab ci templates
include:
- template: License-Management.gitlab-ci.yml
- template: Dependency-Scanning.gitlab-ci.yml
# Define stages
stages:
- seccompl
- test
before_script:
- apt-get update -yqq
- apt-get install git -yqq zlib1g-dev exiftool
# Install php libzip
- docker-php-ext-install zip
# Install php other
- docker-php-ext-install ctype iconv json session tokenizer
- docker-php-ext-enable ctype iconv json session tokenizer
# Install composer
- curl -sS https://getcomposer.org/installer | php
# Install all project dependencies
- php composer.phar install
- php composer.phar update
# Scan dependencies
gemnasium-dependency_scanning:
stage: seccompl
before_script:
# Override the global before_script because it causes this stage to fail
- echo "Starting dependency scanning..."
# Scan licenses
license_scanning:
stage: seccompl
before_script:
# Override the global before_script
- echo "Starting licenses compliance management..."
# Select what we should cache between builds
cache:
paths:
- vendor/
# Run unit tests
phpunit:
stage: test
script:
- ./vendor/bin/phpunit