Browse Source

Add .gitlab-ci.yml

tags/3.1.0
Mike Koch 2 years ago
parent
commit
99ad9ecd63
2 changed files with 22 additions and 0 deletions
  1. 8
    0
      .gitlab-ci.yml
  2. 14
    0
      ci/docker_install.sh

+ 8
- 0
.gitlab-ci.yml View File

@@ -0,0 +1,8 @@
image: php:7.0

before_script:
- bash ci/docker_install.sh > /dev/null

test:app:
script:
- phpunit --configuration api/Tests/phpunit.xml

+ 14
- 0
ci/docker_install.sh View File

@@ -0,0 +1,14 @@
#!/bin/bash

# We need to install dependencies only for Docker
[[ ! -e /.dockerenv ]] && exit 0

set -xe

# Install git (the php image doesn't have it) which is required by composer
apt-get update -yqq
apt-get install git -yqq

# Install phpunit, the tool that we will use for testing
curl --location --output /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar
chmod +x /usr/local/bin/phpunit

Loading…
Cancel
Save