Merged
Show file tree
Hide file tree
Changes from all commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Failed to load files.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
name: "Run unit tests"

on:
- push

jobs:
test:
name: "Build"
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.1', '7.2', '7.3', '7.4']
laravel: ['5.5', '5.6', '5.7', '5.8', '6.x']
exclude:
# Laravel 6.x is 7.2+
- php: '7.1'
laravel: '6.x'
services:
database:
image: mysql:5
ports:
- 13306:3306
env:
MYSQL_ROOT_PASSWORD: 'test'
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout repository
uses: actions/checkout@v1

- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php }}
extensions: json,mbstring,pdo,mysql,dom
coverage: xdebug

- name: Start build on Code Climate
continue-on-error: true
run: |
curl -o ./cc-test-reporter -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
chmod +x ./cc-test-reporter
./cc-test-reporter before-build

- name: Get user-level Composer cache
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Setup Composer cache
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.laravel }}-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
composer-${{ runner.os }}-${{ matrix.laravel }}-${{ matrix.php }}-
composer-${{ runner.os }}-${{ matrix.laravel }}-
composer-${{ runner.os }}-


- name: Install dependencies for Laravel 5.5
if: ( matrix.laravel == '5.5' )
run: |
composer require "phpunit/phpunit:^6.0" --no-update
composer require "laravel/framework:~5.5.0" --no-update
composer require "orchestra/database:~3.5.0" --no-update
composer require "orchestra/testbench:~3.5.0" --no-update

- name: Install dependencies for Laravel 5.6
if: ( matrix.laravel == '5.6' )
run: |
composer require "phpunit/phpunit:^7.0" --no-update
composer require "laravel/framework:~5.6.0" --no-update
composer require "orchestra/database:~3.6.0" --no-update
composer require "orchestra/testbench:~3.6.0" --no-update

- name: Install dependencies for Laravel 5.7
if: ( matrix.laravel == '5.7' )
run: |
composer require "phpunit/phpunit:^7.0" --no-update
composer require "laravel/framework:~5.7.0" --no-update
composer require "orchestra/database:~3.7.0" --no-update
composer require "orchestra/testbench:~3.7.0" --no-update

- name: Install dependencies for Laravel 5.8
if: ( matrix.laravel == '5.8' )
run: |
composer require "phpunit/phpunit:^7.0" --no-update
composer require "laravel/framework:~5.8.0" --no-update
composer require "orchestra/database:~3.8.0" --no-update
composer require "orchestra/testbench:~3.8.0" --no-update

- name: Install dependencies for Laravel 6
if: ( matrix.laravel == '6.x' )
run: |
composer require "phpunit/phpunit:^8.3" --no-update
composer require "laravel/framework:^6.0" --no-update
composer require "orchestra/database:^4.0" --no-update
composer require "orchestra/testbench:^4.0" --no-update

- name: Install composer dependencies
run: composer install --no-suggest --no-progress --no-interaction --prefer-source

- name: Run unit tests
run: vendor/bin/phpunit --coverage-text
env:
TESTING_DB_PASS: 'test'
TESTING_DB_PORT: 13306

- name: Complete build on Code Climate
continue-on-error: true
run: ./cc-test-reporter after-build --coverage-input-type clover --prefix "${_WORKSPACE}" --exit-code ${{ job.status == 'failure' }}
if: always()

- name: Upload coverage to Code Climate
continue-on-error: true
run: vendor/bin/test-reporter
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@ matrix:
- php: 7.2
env: LARAVEL=58
- php: 7.2
env: LARAVEL=6
env: LARAVEL=6x
- php: 7.3
env: LARAVEL=55
- php: 7.3
Expand All@@ -29,27 +29,18 @@ matrix:
- php: 7.3
env: LARAVEL=58
- php: 7.3
env: LARAVEL=6
env: LARAVEL=6x

services:
- mysql

before_script:
# Extensions: ext-uopz
- if [ "$TRAVIS_PHP_VERSION" = "7.1" ] ; then pecl install uopz ; fi
- if [ "$TRAVIS_PHP_VERSION" = "7.2" ] ; then pecl install uopz ; fi
# - if [ "$TRAVIS_PHP_VERSION" = "7.3" ] ; then wget -O $TRAVIS_BUILD_DIR/uopz-5.0.2.tgz https://pecl.php.net/get/uopz-5.0.2.tgz ; fi
# - if [ "$TRAVIS_PHP_VERSION" = "7.3" ] ; then tar xvf $TRAVIS_BUILD_DIR/uopz-5.0.2.tgz ; fi
# - if [ "$TRAVIS_PHP_VERSION" = "7.3" ] ; then mv $TRAVIS_BUILD_DIR/uopz-5.0.2 $TRAVIS_BUILD_DIR/ext-uopz ; fi
# - if [ "$TRAVIS_PHP_VERSION" = "7.3" ] ; then wget -O $TRAVIS_BUILD_DIR/ext-uopz/php73. https://gist.usercontent.com/cmb69/3060a552fc825497d066262ab31f3998/raw/428c0aee7d77b6c37ea3757bbc8b86cfc390d7ca/0001-Update-for-PHP-7.3. ; fi
# - if [ "$TRAVIS_PHP_VERSION" = "7.3" ] ; then cd $TRAVIS_BUILD_DIR/ext-uopz && -p1 < php73. && phpize && ./configure && make && make install ; fi
# Tests: Code Climate
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
# Packages: Install
# Packages: Prepare composer
- composer self-update
- composer install --prefer-source --no-interaction

script:
# Packages: Laravel 5.5.x
Expand All@@ -72,15 +63,15 @@ script:
- if [ "$LARAVEL" = "58" ] ; then composer require "laravel/framework:5.8.*" --no-update ; fi
- if [ "$LARAVEL" = "58" ] ; then composer require "orchestra/database:3.8.*" --no-update ; fi
- if [ "$LARAVEL" = "58" ] ; then composer require "orchestra/testbench:3.8.*" --no-update ; fi
# Packages: Laravel 6.x.x
- if [ "$LARAVEL" = "6" ] ; then composer require "phpunit/phpunit:^8.0" --no-update ; fi
- if [ "$LARAVEL" = "6" ] ; then composer require "laravel/framework:^6.0" --no-update ; fi
- if [ "$LARAVEL" = "6" ] ; then composer require "orchestra/database:^4.0" --no-update ; fi
- if [ "$LARAVEL" = "6" ] ; then composer require "orchestra/testbench:^4.0" --no-update ; fi
# Packages: Update
- composer update --prefer-source --no-interaction
# Packages: Laravel ^6.0
- if [ "$LARAVEL" = "6x" ] ; then composer require "phpunit/phpunit:^8.3" --no-update ; fi
- if [ "$LARAVEL" = "6x" ] ; then composer require "laravel/framework:^6.0" --no-update ; fi
- if [ "$LARAVEL" = "6x" ] ; then composer require "orchestra/database:^4.0" --no-update ; fi
- if [ "$LARAVEL" = "6x" ] ; then composer require "orchestra/testbench:^4.0" --no-update ; fi
# Packages: Install
- composer install --prefer-source --no-interaction
# Tests: Run
- vendor/bin/phpunit --coverage-clover "$TRAVIS_BUILD_DIR/build/logs/clover.xml"
- composer test -- --coverage-clover "$TRAVIS_BUILD_DIR/build/logs/clover.xml"

after_script:
- ./cc-test-reporter after-build --coverage-input-type clover --prefix "$TRAVIS_BUILD_DIR" --exit-code $TRAVIS_TEST_RESULT
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,7 +75,7 @@ Laravel|[v5.5](https://laravel.com/docs/5.5/releases)|[v0.1.0](https://.co
Laravel|[v5.6](https://laravel.com/docs/5.6/releases)|[v0.1.1](https://.com/austinheap/laravel-database-encryption/releases/tag/v0.1.1) ([Packagist](https://packagist.org/packages/austinheap/laravel-database-encryption#v0.1.1))|Stable|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.1.1)](https://travis-ci.org/austinheap/laravel-database-encryption)|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.1.1)](https://travis-ci.org/austinheap/laravel-database-encryption)|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.1.1)](https://travis-ci.org/austinheap/laravel-database-encryption)
Laravel|[v5.7](https://laravel.com/docs/5.7/releases)|[v0.2.0](https://.com/austinheap/laravel-database-encryption/releases/tag/v0.2.0) ([Packagist](https://packagist.org/packages/austinheap/laravel-database-encryption#v0.2.0))|Stable|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.2.0)](https://travis-ci.org/austinheap/laravel-database-encryption)|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.2.0)](https://travis-ci.org/austinheap/laravel-database-encryption)|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.2.0)](https://travis-ci.org/austinheap/laravel-database-encryption)
Laravel|[v5.8](https://laravel.com/docs/5.8/releases)|[v0.2.1](https://.com/austinheap/laravel-database-encryption/releases/tag/v0.2.1) ([Packagist](https://packagist.org/packages/austinheap/laravel-database-encryption#v0.2.1))|Stable|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.2.1)](https://travis-ci.org/austinheap/laravel-database-encryption)|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.2.1)](https://travis-ci.org/austinheap/laravel-database-encryption)|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.2.1)](https://travis-ci.org/austinheap/laravel-database-encryption)
Laravel|[v6.x](https://laravel.com/docs/6.x/releases)|[v0.2.2](https://.com/austinheap/laravel-database-encryption/releases/tag/v0.2.2) ([Packagist](https://packagist.org/packages/austinheap/laravel-database-encryption#v0.2.2))|Stable|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.2.2)](https://travis-ci.org/austinheap/laravel-database-encryption)|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.2.2)](https://travis-ci.org/austinheap/laravel-database-encryption)|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.2.2)](https://travis-ci.org/austinheap/laravel-database-encryption)
Laravel|[v6.x](https://laravel.com/docs/6.x/releases)|[v0.3.0](https://.com/austinheap/laravel-database-encryption/releases/tag/v0.3.0) ([Packagist](https://packagist.org/packages/austinheap/laravel-database-encryption#v0.3.0))|Stable|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.3.0)](https://travis-ci.org/austinheap/laravel-database-encryption)|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.3.0)](https://travis-ci.org/austinheap/laravel-database-encryption)|[![Build Status](https://travis-ci.org/austinheap/laravel-database-encryption.svg?branch=v0.3.0)](https://travis-ci.org/austinheap/laravel-database-encryption)

## Schemas

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,9 @@
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
convertDeprecationsToExceptions="false"
processIsolation="false"
failOnWarning="false"
stopOnFailure="false">

<filter>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@
* src/Console/Commands/MigrateEncryptionCommand.php.
*
* @author Austin Heap <[email protected]>
* @version v0.2.2
* @version v0.3.0
*/
declare(strict_types=1);

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@
* src/EncryptionFacade.php.
*
* @author Austin Heap <[email protected]>
* @version v0.2.2
* @version v0.3.0
*/
declare(strict_types=1);

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@
* src/EncryptionHelper.php.
*
* @author Austin Heap <[email protected]>
* @version v0.2.2
* @version v0.3.0
*/
declare(strict_types=1);

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@
* src/EncryptionServiceProvider.php.
*
* @author Austin Heap <[email protected]>
* @version v0.2.2
* @version v0.3.0
*/
declare(strict_types=1);

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@
* src/Traits/HasEncryptedAttributes.php.
*
* @author Austin Heap <[email protected]>
* @version v0.2.2
* @version v0.3.0
*/
declare(strict_types=1);

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@
* src/helpers.php.
*
* @author Austin Heap <[email protected]>
* @version v0.2.2
* @version v0.3.0
*/
declare(strict_types=1);

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,7 @@
* @package laravel-database-encryption
* @link https://.com/austinheap/laravel-database-encryption
* @author Austin Heap <[email protected]>
* @version v0.2.2
* @version v0.3.0
*/

namespace AustinHeap\Database\Encryption\Tests\Defaults;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,7 @@
* @package laravel-database-encryption
* @link https://.com/austinheap/laravel-database-encryption
* @author Austin Heap <[email protected]>
* @version v0.2.2
* @version v0.3.0
*/

namespace AustinHeap\Database\Encryption\Tests\Defaults;
Expand Down
Loading