Skip to content

Commit

Permalink
Updated deps for PHP8.x and Laravel 9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
kevindierkx committed Nov 10, 2022
1 parent 0aa5435 commit d73a822
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 94 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI-CD

on: [push, pull_request]

jobs:
php-test:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: [8.0, 8.1]
laravel: [9.*]
stability: [prefer-stable]
composer-flags: ['']
experimental: [false]

continue-on-error: ${{ matrix.experimental }}

name: PHP:${{ matrix.php }} / Laravel:${{ matrix.laravel }}(${{ matrix.stability }})

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov

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

- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
restore-keys: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update --dev
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest ${{ matrix.composer-flags }}
- name: Execute PHPCS
run: composer phpcs

- name: Execute PHPUnit
run: vendor/bin/phpunit --verbose --coverage-text --coverage-clover=coverage.clover

- name: Code coverage
if: ${{ github.ref == 'refs/heads/master' }}
run: |
bash <(curl -s https://codecov.io/bash)
16 changes: 9 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
/build
/node_modules
/.idea
/.vscode
/coverage
/phpunit.xml
/vendor
composer.lock

.DS_Store
.php-cs-fixer.cache
.phpunit.result.cache
clover.xml
composer.lock
composer.phar
Thumbs.db

.idea
.php_cs.cache
8 changes: 8 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

$finder = (new PhpCsFixer\Finder())
->in(__DIR__.'/src')
->in(__DIR__.'/tests/src')
->ignoreVCSIgnored(true);

return (new \DistortedFusion\PhpCsFixerConfig\Config())->setFinder($finder);
31 changes: 0 additions & 31 deletions .php_cs.dist

This file was deleted.

19 changes: 0 additions & 19 deletions .scrutinizer.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

40 changes: 25 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,39 @@
{
"name": "distortedfusion/laravel-env-management",
"description": "A collection of artisan commands for managing environment variables during CI/CD.",
"homepage": "https://github.com/distortedfusion/laravel-env-management",
"license": "MIT",
"keywords": ["laravel", "env", "management", "distortedfusion"],
"keywords": ["distortedfusion", "laravel", "env", "management"],
"authors": [
{
"name": "Kevin Dierkx",
"email": "[email protected]"
},
{
"name": "Contributors",
"homepage": "https://github.com/distortedfusion/laravel-env-management/graphs/contributors"
}
],
"require": {
"php": "^7.2",
"illuminate/console": "^6.0 || ^7.0"
"php": "^8.0",
"illuminate/console": "^9.35"
},
"require-dev": {
"orchestra/testbench": "^5.2",
"friendsofphp/php-cs-fixer": "^2.16"
"distortedfusion/php-cs-fixer-config": "^2.0",
"orchestra/testbench": "^7.0"
},
"autoload": {
"psr-4": {
"DistortedFusion\\Env\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"DistortedFusion\\Env\\Tests\\": "tests/src/"
}
},
"scripts": {
"phpcs-fix" : "php-cs-fixer fix --using-cache=no --allow-risky=yes --ansi",
"phpcs": "php-cs-fixer fix -v --diff --dry-run --allow-risky=yes --ansi",
"phpunit": "phpunit --coverage-text",
"test": [
Expand All @@ -29,23 +46,16 @@
"phpunit": "Runs unit and function tests",
"test": "Runs all tests"
},
"autoload": {
"psr-4": {
"DistortedFusion\\Env\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"DistortedFusion\\Env\\Tests\\": "tests/src/"
}
},
"extra": {
"laravel": {
"providers": [
"DistortedFusion\\Env\\EnvServiceProvider"
]
}
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}

0 comments on commit d73a822

Please sign in to comment.