Files from "A practical guide to continuous integration in PHP"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: tetraweb/php:7.0 | |
services: | |
- mysql:5.6 | |
variables: | |
MYSQL_ROOT_PASSWORD: root_password | |
MYSQL_DATABASE: my_db | |
before_script: | |
# Install dependencies | |
- bash ci/docker_install.sh | |
test: | |
script: | |
- phpdbg -qrr vendor/bin/phpunit | |
- composer phpstan | tee phpstan_results.txt | |
- security-checker security:check | |
after_script: | |
- /root/washingmachine/washingmachine run -v | |
artifacts: | |
when: always | |
expire_in: 1 month | |
paths: | |
- phpstan_results.txt | |
- coverage | |
- clover.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# We need to install dependencies only for Docker | |
[[ ! -e /.dockerenv ]] && exit 0 | |
set -xe | |
docker-php-ext-enable bcmath mbstring mcrypt pdo_mysql intl gd zip bz2 opcache | |
cp ci/php.ini /usr/local/etc/php/php.ini | |
# Installs Sensiolabs security checker to check against unsecure libraries | |
php -r "readfile('http://get.sensiolabs.org/security-checker.phar');" > /usr/local/bin/security-checker | |
chmod +x /usr/local/bin/security-checker | |
composer global require 'hirak/prestissimo' | |
cd /root | |
composer create-project thecodingmachine/washingmachine --stability=dev | |
cd - | |
composer install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.5/phpunit.xsd" | |
backupGlobals="false" | |
colors="true" | |
bootstrap="vendor/autoload.php" | |
verbose="true" | |
> | |
<testsuites> | |
<testsuite name="Test suite"> | |
<directory>./tests/</directory> | |
</testsuite> | |
</testsuites> | |
<filter> | |
<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="true"> | |
<directory suffix=".php">src/Timemachine</directory> | |
</whitelist> | |
</filter> | |
</phpunit> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment