Browse Source

More CI changes

master
Mike Koch 2 years ago
parent
commit
3b0c8ad3a6
No known key found for this signature in database GPG Key ID: 9BA5D7F8391455ED
2 changed files with 43 additions and 15 deletions
  1. +42
    -14
      .gitlab-ci.yml
  2. +1
    -1
      ci/php_lint.sh

+ 42
- 14
.gitlab-ci.yml View File

@@ -1,6 +1,7 @@
stages:
- validate
- test
- deploy
- package

before_script:
- bash ci/docker_install.sh > /dev/null
@@ -8,34 +9,61 @@ before_script:
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
- php composer-setup.php
- php -r "unlink('composer-setup.php');"
- php composer.phar update

test:7.1:
validate:7.1:
image: php:7.1
stage: test
stage: validate
script:
- composer install
- cd Tests
- phpunit
- cd ../../
- php composer.phar update --no-dev
- php composer.phar install --no-dev
- bash ci/php_lint.sh ./

test:7.0:
validate:7.0:
image: php:7.0
stage: test
stage: validate
script:
- php composer.phar update --no-dev
- php composer.phar install --no-dev
- bash ci/php_lint.sh ./

test:5.5:
validate:5.6:
image: php:5.6
stage: validate
script:
- php composer.phar update --no-dev
- php composer.phar install --no-dev
- bash ci/php_lint.sh ./

validate:5.5:
image: php:5.5
stage: test
stage: validate
script:
- php composer.phar update --no-dev
- php composer.phar install --no-dev
- bash ci/php_lint.sh ./

deploy:
test:7.1:
image: php:7.1
stage: test
script:
- php composer.phar update
- php composer.phar install
- cd Tests
- phpunit

test:7.0:
image: php:7.0
stage: test
script:
- php composer.phar update
- php composer.phar install
- cd Tests
- phpunit

package:
image: tetraweb/php
when: manual
stage: deploy
stage: package
script:
- apt-get update
- apt-get install zip unzip


+ 1
- 1
ci/php_lint.sh View File

@@ -12,7 +12,7 @@ while test $# -gt 0; do
continue
fi

for file in `find $current -type f -not -path "*vendor/*" -name "*.php"` ; do
for file in `find $current -type f -not -path "*vendor/*" -not -path "*api/*" -name "*.php"` ; do
RESULTS=`php -l $file`
echo $RESULTS



Loading…
Cancel
Save