diff --git a/.gitattributes b/.gitattributes index 0d44aa7..0cd4ef9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,9 +1,8 @@ /.gitattributes export-ignore /.gitignore export-ignore -/.travis.yml export-ignore +/docker-compose export-ignore +/docker-compose.yml export-ignore /phpcs.xml.dist export-ignore /phpmd.xml export-ignore /phpunit.xml.dist export-ignore -/puppet export-ignore /test export-ignore -/Vagrantfile export-ignore diff --git a/.gitignore b/.gitignore index 7bef0bc..61ead86 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/.vagrant /vendor diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0a08a87..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: php -php: - - 7.2 - - 7.3 - -install: - - composer install - -script: - - composer test diff --git a/README.md b/README.md index 401068c..86d1616 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Laravel Illuminate Romans Integration -[![Build Status](https://travis-ci.org/wandersonwhcr/illuminate-romans.svg?branch=master)](https://travis-ci.org/wandersonwhcr/illuminate-romans) +[![Build Status](https://github.com/wandersonwhcr/illuminate-romans/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/wandersonwhcr/illuminate-romans/actions/workflows/test.yml?query=branch%3Amain) [![Latest Stable Version](https://poser.pugx.org/wandersonwhcr/illuminate-romans/v/stable?format=flat)](https://packagist.org/packages/wandersonwhcr/illuminate-romans) [![License](https://poser.pugx.org/wandersonwhcr/illuminate-romans/license?format=flat)](https://packagist.org/packages/wandersonwhcr/illuminate-romans) @@ -59,7 +59,20 @@ $value = roman_to_int($value); // 1999 $value = int_to_roman($value); // MCMXCIX ``` +## Development + +You can use Docker Compose to build an image and run a container to develop and +test this package. + +```bash +docker-compose up --detach + +docker-compose exec romans composer install + +docker-compose exec romans composer test +``` + ## License This package is opensource and available under license MIT described in -[LICENSE](https://github.com/wandersonwhcr/laravel-romans/blob/master/LICENSE). +[LICENSE](https://github.com/wandersonwhcr/laravel-romans/blob/main/LICENSE). diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 0358559..0000000 --- a/Vagrantfile +++ /dev/null @@ -1,9 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.box = "puppetlabs/debian-8.2-32-puppet" - - config.vm.provision 'puppet' do |puppet| - puppet.options = "--verbose --debug" - puppet.environment = "develop" - puppet.environment_path = "puppet/environments" - end -end diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3b70818 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: "3.8" + +services: + + romans: + build: "./docker-compose" + volumes: + - ".:/app" + user: "${UID:-1000}:${GID:-1000}" + command: ["tail", "-f", "/dev/null"] diff --git a/docker-compose/Dockerfile b/docker-compose/Dockerfile new file mode 100644 index 0000000..b94748d --- /dev/null +++ b/docker-compose/Dockerfile @@ -0,0 +1,12 @@ +FROM php:7.2-cli-alpine + +ENV COMPOSER_CACHE_DIR /tmp + +COPY --from=composer:2.0 /usr/bin/composer /usr/bin/composer + +RUN find /usr/src -type f -name 'php.tar*' -delete \ + && apk add unzip + +VOLUME /app + +WORKDIR /app diff --git a/puppet/environments/develop/manifests/default.pp b/puppet/environments/develop/manifests/default.pp deleted file mode 100644 index bc85e58..0000000 --- a/puppet/environments/develop/manifests/default.pp +++ /dev/null @@ -1,73 +0,0 @@ -Exec { - path => ["/usr/bin", "/bin", "/usr/sbin", "/sbin"], - timeout => 0, -} - -Package { - require => Exec["apt-get : update"], - before => Exec["apt-get : autoremove"], -} - -exec { "apt-get : update": - command => "apt-get update", -} - -exec { "apt-get : autoremove": - command => "apt-get autoremove -q -y", -} - -exec { "apt-get : https-update": - command => "apt-get update", -} - -package { "apt-get : https": - name => "apt-transport-https", - require => Exec["apt-get : https-update"], -} - -package { "vim": - name => "vim", -} - -package { "git": - name => "git", -} - -package { "unzip": - name => "unzip", -} - -exec { "php : key": - creates => "/etc/apt/trusted.gpg.d/php.gpg", - command => "wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg", -} - -file { "php : list": - path => "/etc/apt/sources.list.d/php.list", - content => "deb https://packages.sury.org/php/ jessie main", - require => Exec["php : key"], - before => Exec["apt-get : update"], -} - -package { "php : cli": - name => "php-cli", - require => [ - File["php : list"], - Exec["apt-get : update"], - ], -} - -package { "php : xml": - name => "php-xml", - require => Package["php : cli"], -} - -package { "php : mbstring": - name => "php-mbstring", - require => Package["php : cli"], -} - -exec { "composer": - creates => "/usr/bin/composer", - command => "curl https://getcomposer.org/composer.phar -o /usr/bin/composer && chmod +x /usr/bin/composer", -}