Browse Source

gitlabci start

- updated composer.json
- renamed & updated phpunit.xml
- added .gitlab-ci.yml
v3-dev
REJack 6 years ago
parent
commit
9a741b85ed
No known key found for this signature in database
GPG Key ID: 4A44B48700429F46
  1. 28
      .gitlab-ci.yml
  2. 38
      composer.json
  3. 24
      phpunit.xml

28
.gitlab-ci.yml

@ -0,0 +1,28 @@
# This file is a template, and might need editing before it works on your project.
# Select image from https://hub.docker.com/_/php/
image: rejack/php7-testing-phpunit-ci4:7.2
before_script:
- mkdir aauth_temp
- mv !(aauth_temp) aauth_temp
- curl https://github.com/codeigniter4/CodeIgniter4/archive/v4.0.0-alpha.3.tar.gz | tar xvz
- mv aauth_temp/* CodeIgniter4-4.0.0-alpha.3
- cd CodeIgniter4-4.0.0-alpha.3
- composer 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.
services:
- mysql:5.7
# Set any variables we need
variables:
# Configure mysql environment variables (https://hub.docker.com/r/_/mysql/)
MYSQL_DATABASE: mysql_database
MYSQL_ROOT_PASSWORD: root
# Run our tests
# If Xdebug was installed you can generate a coverage report and see code coverage metrics.
test:
script:
- vendor/bin/phpunit --configuration phpunit.xml --coverage-text --colors=never

38
composer.json

@ -1,36 +1,38 @@
{ {
"description": "The CodeIgniter framework v4", "name": "codeigniter4/codeigniter4",
"name": "codeigniter4/framework",
"type": "project", "type": "project",
"description": "The CodeIgniter framework v4",
"homepage": "https://codeigniter.com", "homepage": "https://codeigniter.com",
"license": "MIT", "license": "MIT",
"support": {
"forum": "http://forum.codeigniter.com/",
"slack": "https://codeigniterchat.slack.com",
"source": "https://github.com/bcit-ci/CodeIgniter4"
},
"autoload": {
"psr-4": {
"CodeIgniter\\": "system/",
"Psr\\Log\\": "system/ThirdParty/PSR/Log/"
}
},
"require": { "require": {
"php": ">=7.1", "php": ">=7.1",
"zendframework/zend-escaper": "^2.5", "ext-curl": "*",
"kint-php/kint": "^2.1",
"ext-intl": "*", "ext-intl": "*",
"ext-curl": "*" "ext-json": "*",
"kint-php/kint": "^2.1",
"psr/log": "^1.1",
"zendframework/zend-escaper": "^2.5"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^7.0", "codeigniter4/codeigniter4-standard": "^1.0",
"mikey179/vfsStream": "1.6.*", "mikey179/vfsStream": "1.6.*",
"codeigniter4/codeigniter4-standard": "^1.0" "phpunit/phpunit": "^7.0",
"squizlabs/php_codesniffer": "^3.3"
},
"autoload": {
"psr-4": {
"CodeIgniter\\": "system/"
}
}, },
"scripts": { "scripts": {
"post-update-cmd": [ "post-update-cmd": [
"composer dump-autoload", "composer dump-autoload",
"CodeIgniter\\ComposerScripts::postUpdate" "CodeIgniter\\ComposerScripts::postUpdate"
] ]
},
"support": {
"forum": "http://forum.codeigniter.com/",
"source": "https://github.com/codeigniter4/CodeIgniter4",
"slack": "https://codeigniterchat.slack.com"
} }
} }

24
phpunit.xml.dist → phpunit.xml

@ -14,27 +14,19 @@
<directory>./tests</directory> <directory>./tests</directory>
<exclude>./tests/system</exclude> <exclude>./tests/system</exclude>
</testsuite> </testsuite>
<testsuite name="system">
<directory>./tests/system</directory>
<exclude>./tests/system/Database</exclude>
</testsuite>
<testsuite name="database"> <testsuite name="database">
<directory>./tests/system/Database</directory> <directory>./tests/database</directory>
</testsuite> </testsuite>
</testsuites> </testsuites>
<filter> <filter>
<whitelist processUncoveredFilesFromWhitelist="true"> <whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./system</directory> <directory suffix=".php">./application</directory>
<exclude> <exclude>
<directory>./system/Debug/Toolbar/Views</directory> <directory>./application/Config</directory>
<directory>./system/Pager/Views</directory> <directory>./application/Filters</directory>
<directory>./system/ThirdParty</directory> <directory>./application/Language</directory>
<directory>./system/Validation/Views</directory> <directory>./application/Views</directory>
<file>./system/bootstrap.php</file>
<file>./system/Commands/Sessions/Views/migration.tpl.php</file>
<file>./system/ComposerScripts.php</file>
<file>./system/Config/Routes.php</file>
</exclude> </exclude>
</whitelist> </whitelist>
</filter> </filter>
@ -42,4 +34,8 @@
<logging> <logging>
<log type="coverage-clover" target="build/logs/clover.xml"/> <log type="coverage-clover" target="build/logs/clover.xml"/>
</logging> </logging>
<php>
<env name="app.baseURL" value="http://example.com"/>
</php>
</phpunit> </phpunit>
Loading…
Cancel
Save