Created
September 22, 2015 22:52
-
-
Save iolson/a60c5f238b90f411bec3 to your computer and use it in GitHub Desktop.
GitLab CI Runner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Before Script | |
before_script: | |
- composer self-update | |
- composer install --prefer-dist > /dev/null | |
- cp .env.example .env | |
- php artisan key:generate | |
- php artisan migrate:refresh --seed | |
# Services | |
services: | |
- mysql:latest | |
# Variables | |
variables: | |
MYSQL_USER: homestead | |
MYSQL_PASSWORD: secret | |
MYSQL_DATABASE: homestead | |
# PHP 5.5 | |
php:5.5: | |
image: bobey/docker-gitlab-ci-runner-php5.5 | |
script: | |
- echo "Running PHPUnit Tests" | |
- php vendor/bin/phpunit --colors --debug --coverage-text | |
# PHP 5.6 | |
php:5.6: | |
image: bobey/docker-gitlab-ci-runner-php5.6 | |
script: | |
- echo "Running PHPUnit Tests" | |
- php vendor/bin/phpunit --colors --debug --coverage-text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[runners]] | |
name = "php" | |
url = "gitlab-url" | |
token = "token" | |
limit = 1 | |
executor = "docker" | |
environment = ["MYSQL_ALLOW_EMPTY_PASSWORD=1", "COMPOSER_GITHUB=composer-token"] | |
[runners.docker] | |
image = "" | |
wait_for_services_timeout = 0 | |
allowed_images = ["*", "*/*"] | |
allowed_services = ["*", "*/*"] | |
privileged = false | |
volumes = ["/cache", "/composer-auth.json:/root/.composer/auth.json:ro"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment