Changed CI to Gitlab
This commit is contained in:
26
.gitlab-ci.yml
Normal file
26
.gitlab-ci.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
image: alpine:3.8
|
||||
|
||||
# This configures the whole environment
|
||||
before_script:
|
||||
# Install git, make, zip and php + extensions
|
||||
- ping -c 3 alpinelinux.org
|
||||
- apk add --no-cache git curl make gcc unzip php7 php7-mcrypt php7-intl php7-gettext php7-ctype php7-curl php7-dom php7-fileinfo php7-ftp php7-iconv php7-json php7-mbstring php7-mysqlnd php7-openssl php7-pdo php7-pdo_sqlite php7-pear php7-phar php7-posix php7-session php7-simplexml php7-sqlite3 php7-tokenizer php7-xml php7-xmlreader php7-xmlwriter php7-zlib php7-xdebug
|
||||
# Enable xDebug for coverage report
|
||||
- echo "zend_extension=/usr/lib/php7/modules/xdebug.so" >> /etc/php7/php.ini
|
||||
- echo "xdebug.coverage_enable=1" >> /etc/php7/php.ini
|
||||
# Display php version
|
||||
- php -v
|
||||
# Install and run composer
|
||||
- curl --location --output /usr/local/bin/composer https://getcomposer.org/download/1.7.3/composer.phar
|
||||
- chmod +x /usr/local/bin/composer
|
||||
- composer install --ansi
|
||||
|
||||
test:
|
||||
cache:
|
||||
key: ${CI_COMMIT_REF_SLUG}
|
||||
paths:
|
||||
- vendor/
|
||||
script:
|
||||
- php vendor/bin/phpunit --coverage-text --colors=never
|
||||
only:
|
||||
- branches
|
||||
30
.travis.yml
30
.travis.yml
@@ -1,30 +0,0 @@
|
||||
language: php
|
||||
env:
|
||||
global:
|
||||
- CC_TEST_REPORTER_ID=$CC_TEST_REPORTER_ID
|
||||
dist: precise
|
||||
php:
|
||||
- '7.1'
|
||||
- '7.2'
|
||||
- nightly
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
|
||||
sudo: false
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.composer/cache
|
||||
|
||||
before_script:
|
||||
- travis_retry composer self-update
|
||||
- travis_retry composer install --no-interaction --prefer-dist
|
||||
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
||||
- chmod +x ./cc-test-reporter
|
||||
- ./cc-test-reporter before-build
|
||||
|
||||
script: composer run test
|
||||
|
||||
after_script:
|
||||
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
||||
8
Makefile
Normal file
8
Makefile
Normal file
@@ -0,0 +1,8 @@
|
||||
coverage:
|
||||
vendor/bin/phpunit --coverage-text
|
||||
|
||||
cs:
|
||||
vendor/bin/php-cs-fixer fix --diff --verbose
|
||||
|
||||
commit: cs coverage
|
||||
git add . && git commit
|
||||
@@ -1,14 +1,6 @@
|
||||
Rut Chileno
|
||||
===========
|
||||
|
||||
[](https://travis-ci.org/mnavarrocarter/chilean-rut)
|
||||
[](https://codeclimate.com/github/mnavarrocarter/chilean-rut/maintainability)
|
||||
[](https://codeclimate.com/github/mnavarrocarter/chilean-rut/test_coverage)
|
||||
[](https://packagist.org/packages/mnavarrocarter/chilean-rut)
|
||||
[](https://packagist.org/packages/mnavarrocarter/chilean-rut)
|
||||
[](https://packagist.org/packages/mnavarrocarter/chilean-rut)
|
||||
[](https://packagist.org/packages/mnavarrocarter/chilean-rut)
|
||||
|
||||
Esta librería implementa una clase Rut como un *value object* inmutable, incluyendo
|
||||
una api de validación flexible y extendible.
|
||||
|
||||
|
||||
@@ -30,9 +30,5 @@
|
||||
"psr-4": {
|
||||
"MNC\\ChileanRut\\Tests\\": "tests"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"test": "@php vendor/bin/phpunit --verbose --coverage-text --coverage-clover build/logs/clover.xml",
|
||||
"style": "@php vendor/bin/php-cs-fixer fix"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user