Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/actions/ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM phpdockerio/php71-fpm:latest

LABEL maintainer="TiagoDevWeb"

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt-get -y --no-install-recommends install php7.1-sqlite3 php7.1-gd php7.1-xml php7.1-imagick php-xdebug git \
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
5 changes: 5 additions & 0 deletions .github/actions/ci/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: 'tests'
description: 'tests'
runs:
using: 'Docker'
image: 'Dockerfile'
3 changes: 3 additions & 0 deletions .github/actions/ci/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

vendor/bin/phpcs && vendor/bin/phpunit
5 changes: 5 additions & 0 deletions .github/actions/composer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM composer:latest

ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
5 changes: 5 additions & 0 deletions .github/actions/composer/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: 'composer-install'
description: 'composer install'
runs:
using: 'Docker'
image: 'Dockerfile'
3 changes: 3 additions & 0 deletions .github/actions/composer/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

composer install
11 changes: 11 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Main
on: push

jobs:
build:
name: Main
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- uses: ./.github/actions/composer
- uses: ./.github/actions/ci
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor/
.idea
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM phpdockerio/php71-fpm:latest

LABEL maintainer="TiagoDevWeb"

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt-get -y --no-install-recommends install php7.1-sqlite3 php7.1-gd php7.1-xml php7.1-imagick php-xdebug git \
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

RUN cd '/' \
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php composer-setup.php \
&& php -r "unlink('composer-setup.php');" \
&& mv composer.phar /usr/local/bin/composer

WORKDIR /var/www
File renamed without changes.
23 changes: 23 additions & 0 deletions README.MD → README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Laravel validators for base64 encoded files, includes versions of laravel files validation for base64 encoded files.

<p><img src="https://github.com/tiagodevweb/base64-validation/workflows/Main/badge.svg"/></p>

## Requirements

* PHP: 7.1+
Expand Down Expand Up @@ -47,6 +49,27 @@ php artisan vendor:publish --provider="Crazybooot\Base64Validation\Providers\Ser
and setting up `replace_validation_messages` option to `false` on config/base64validation.php file,
and add localizations for rules in standard Laravel way.

# Development environment

### Requirements
* [Docker](https://docs.docker.com/get-docker/)
* [Docker Compose](https://docs.docker.com/compose/install/)

### Usage
```bash
docker-compose exec app composer ...
```
### Style Code

``` bash
composer cs
```
### Testing

``` bash
composer test
```

## License

The MIT License (MIT). Please see [License File](LICENSE.MD) for more information.
Expand Down
20 changes: 16 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,36 @@
"download",
"laravel"
],
"license": "MIT",
"authors": [
{
"name": "crazybooot",
"email": "crazybooot@gmail.com"
}
],
"license": "MIT",
"minimum-stability": "dev",
"require": {
"php": "^7.1",
"laravel/framework": "^5.5|^6.0|^7.0|^8.0"
},
"require-dev": {
"orchestra/testbench": "^3.8",
"squizlabs/php_codesniffer": "^3.5",
"intervention/image": "^2.5"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Crazybooot\\Base64Validation\\": "/src"
"Crazybooot\\Base64Validation\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"test": "vendor/bin/phpunit",
"cs": "vendor/bin/phpcs"
},
"extra": {
"laravel": {
"providers": [
Expand Down
Loading