Attempt to use lighter docker images for gitlab builds

This commit is contained in:
Timothy Warren 2018-01-31 13:35:52 -05:00
parent 2c358533a8
commit 8e13b80a3a
2 changed files with 7 additions and 5 deletions

View File

@ -5,7 +5,7 @@ before_script:
- php composer.phar install --ignore-platform-reqs - php composer.phar install --ignore-platform-reqs
services: services:
- mysql:latest - mysql:latest
- postgres:latest - postgres:alpine
variables: variables:
MYSQL_ROOT_PASSWORD: foo-bar-baz MYSQL_ROOT_PASSWORD: foo-bar-baz
@ -17,11 +17,11 @@ variables:
POSTGRES_PASSWORD: test POSTGRES_PASSWORD: test
test:7.1: test:7.1:
image: php:7.1 image: php:7.1-alpine
script: script:
- vendor/bin/phpunit -c build --no-coverage - vendor/bin/phpunit -c build --no-coverage
test:7.2: test:7.2:
image: php:7.2 image: php:7.2-alpine
script: script:
- vendor/bin/phpunit -c build --no-coverage - vendor/bin/phpunit -c build --no-coverage

View File

@ -9,8 +9,10 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
set -xe set -xe
# Install git (the php image doesn't have it) which is required by composer # Install git (the php image doesn't have it) which is required by composer
apt-get update -yqq echo -e 'http://dl-cdn.alpinelinux.org/alpine/edge/main\nhttp://dl-cdn.alpinelinux.org/alpine/edge/community\nhttp://dl-cdn.alpinelinux.org/alpine/edge/testing' > /etc/apk/repositories
apt-get install git libpq-dev unzip -yqq apk add --no-cache \
curl \
git
# Install phpunit, the tool that we will use for testing # Install phpunit, the tool that we will use for testing
curl -Lo /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar curl -Lo /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar