Gitlab Pipelines Docker image based on Ubuntu 16.04 with PHP/Composer/MySQL/Node
10K+
php7.0-fpm, php7.0-mcrypt, mongod, xdebug, php7.0-zip, php7.0-xml, php7.0-mbstring, php7.0-curl, php7.0-json, php7.0-imap, php7.0-mysql and php7.0-tokenizer.gitlab-ci.ymlstages:
- test
# Speed up builds
cache:
key: $CI_BUILD_REF_NAME
paths:
- vendor
- node_modules
- ~/.composer/cache/files
before_script:
- sh .gitlab-ci.sh
- echo "$GITLAB_SSH_KEY" >> ~/.ssh/id_rsa
- ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
- chmod 600 ~/.ssh/id_rsa
- composer install
test:
stage: test
services:
image: andmetoo/gitlab-runner-php7
script:
- codecept run --coverage --coverage-text --coverage-html
artifacts:
paths:
- tests/_output/coverage/
- tests/_output/coverage.txt
expire_in: 2 week
gitlab-ci.sh#!/usr/bin/env bash
# Install dependencies only for Docker.
[[ ! -e /.dockerinit ]] && exit 0
set -xe
# Install Composer and project dependencies.
echo "start mysql"
service mysql start
echo "add user"
mysql -h localhost --user=root --password=root -e "CREATE DATABASE test;CREATE USER 'test'@'%' IDENTIFIED BY 'test';GRANT ALL PRIVILEGES ON *.* TO 'test'@'%'; FLUSH PRIVILEGES;"
# Copy over testing configuration.
#start rabbit
service rabbitmq-server start
#start memcached
service memcached start
Content type
Image
Digest
Size
371.3 MB
Last updated
over 8 years ago
docker pull andmetoo/gitlab-runner-php7