mirror of
https://github.com/Aviortheking/DeltaCMS.git
synced 2025-04-22 19:02:12 +00:00
Updated Gitlab CI to use composer
This commit is contained in:
parent
5848de0ec7
commit
cd861a071a
@ -8,6 +8,10 @@ cache:
|
||||
- vendor/
|
||||
- node_modules/
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
|
||||
before_script:
|
||||
- apt-get update -yqq
|
||||
- apt-get install -yqq git libzip-dev libmcrypt-dev libpq-dev libcurl4-gnutls-dev libicu-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev
|
||||
@ -18,7 +22,6 @@ before_script:
|
||||
- docker-php-ext-enable xdebug
|
||||
# Install and run Composer
|
||||
- curl -sS https://getcomposer.org/installer | php
|
||||
- php composer.phar install
|
||||
|
||||
# Bring in any services we need http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service
|
||||
# See http://docs.gitlab.com/ce/ci/services/README.html for examples.
|
||||
@ -33,7 +36,18 @@ variables:
|
||||
|
||||
# Run our tests
|
||||
# If Xdebug was installed you can generate a coverage report and see code coverage metrics.
|
||||
test:
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- vendor/bin/phpunit --coverage-text --colors=never
|
||||
- vendor/bin/codacycoverage clover tmp/code-coverage.xml
|
||||
- php composer.phar install
|
||||
|
||||
phpmd:
|
||||
stage: test
|
||||
script:
|
||||
- composer run phpmd
|
||||
|
||||
phpcs:
|
||||
stage: test
|
||||
script:
|
||||
- php composer.phar run phpcs
|
||||
- vendor/bin/codacycoverage clover tmp/code-coverage.xml
|
||||
|
@ -32,5 +32,10 @@
|
||||
"phpunit/phpunit": "^8.1",
|
||||
"codacy/coverage": "^1.4",
|
||||
"phpmd/phpmd": "^2.6"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"phpmd": "phpmd src/ text phpmd",
|
||||
"phpcs": "phpcs --coverage-text --colors=never",
|
||||
"test": "composer run phpmd && composer run phpcs"
|
||||
}
|
||||
}
|
||||
|
26
phpmd.xml
Normal file
26
phpmd.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ruleset name="pcsg-generated-ruleset"
|
||||
xmlns="http://pmd.sf.net/ruleset/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
|
||||
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
|
||||
>
|
||||
<description>AdminPanel rules</description>
|
||||
<!-- <rule ref="rulesets/cleancode.xml"/> -->
|
||||
<rule ref="rulesets/codesize.xml"/>
|
||||
<rule ref="rulesets/controversial.xml"/>
|
||||
<rule ref="rulesets/design.xml"/>
|
||||
<!-- NAMING -->
|
||||
<rule ref="rulesets/naming.xml/ShortVariable">
|
||||
<properties>
|
||||
<property name="minimum" value="2"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/naming.xml/LongVariable"/>
|
||||
<rule ref="rulesets/naming.xml/ShortMethodName"/>
|
||||
<rule ref="rulesets/naming.xml/ConstructorWithNameAsEnclosingClass"/>
|
||||
<rule ref="rulesets/naming.xml/ConstantNamingConventions"/>
|
||||
<rule ref="rulesets/naming.xml/BooleanGetMethodName"/>
|
||||
<!-- NAMING -->
|
||||
<rule ref="rulesets/unusedcode.xml"/>
|
||||
</ruleset>
|
Loading…
x
Reference in New Issue
Block a user