-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
39 lines (38 loc) · 946 Bytes
/
.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
stages:
- test
test-mysql:
tags:
- php7.2
- unit-test
- utc0
stage: test
only:
- main
cache:
key: "$CI_COMMIT_REF_NAME-$CI_JOB_NAME"
paths:
- vendor
artifacts:
expire_in: 2 hours
paths:
- coverage
- .env
# image: mysql5.7 is used to create a container that is linked to the job container.
services:
- mysql:5.7
variables:
# mysql services
MYSQL_ROOT_PASSWORD: root_password
MYSQL_DATABASE: homestead
MYSQL_USER: homestead
MYSQL_PASSWORD: secret
before_script:
- echo 'install php-pcov'
- apt update && apt install -y php-pcov
script:
- composer global require hirak/prestissimo
- composer install --no-scripts --no-interaction --ignore-platform-reqs
- echo "${_TESTING_MYSQL_ENV}" > .env
- php artisan key:generate
- php artisan migrate:refresh --seed
- ./vendor/bin/phpunit --coverage-text --coverage-html=coverage