Skip to content

Commit

Permalink
update project (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin authored Apr 9, 2020
1 parent 506c35f commit 5475571
Show file tree
Hide file tree
Showing 16 changed files with 3,668 additions and 2,419 deletions.
131 changes: 0 additions & 131 deletions .circleci/config.yml

This file was deleted.

146 changes: 146 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
name: Gunther workflow

on: [push]

jobs:
tests:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php-version: ['7.3', '7.4']

steps:
- uses: actions/checkout@v1

- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-version }}
coverage: none
- name: Check PHP Version
run: php -v
- name: Check Composer Version
run: composer -V
- name: Check PHP Extensions
run: php -m

- name: Validate composer.json and composer.lock
run: composer validate

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer files
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --no-interaction --no-suggest --ignore-platform-reqs

- name: Run test suite
run: phpdbg -dmemory_limit=4G -qrr vendor/bin/phpunit -c phpunit.xml --log-junit ./results/junit/results.xml --coverage-clover ./results/coverage.xml

- name: Store results
if: matrix.php-version == '7.3' && matrix.operating-system == 'ubuntu-latest'
uses: actions/upload-artifact@v1
with:
name: results
path: results

psalm:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.3']

steps:
- uses: actions/checkout@v1

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

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer files
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --no-interaction --no-suggest --ignore-platform-reqs

- name: Run psalm
run: vendor/bin/psalm --output-format=github --shepherd

phpstan:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.3']

steps:
- uses: actions/checkout@v1

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

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer files
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --no-interaction --no-suggest --ignore-platform-reqs

- name: Run phpstan
run: vendor/bin/phpstan analyse src

reporting:
needs: tests
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.3']

steps:
- uses: actions/checkout@v1

- name: Download results
uses: actions/download-artifact@v1
with:
name: results

- name: Fix coverage
run: sed -i -e "s%$GITHUB_WORKSPACE/%%g" results/coverage.xml

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ php artisan vendor:publish --provider="Gunther\Providers\ServiceProvider" --tag=

## License

Copyright (c) 2018
Copyright (c) 2018-2020

Licensed under the AGPL License. [View license](/LICENSE).
21 changes: 13 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,21 @@
}
],
"require": {
"caouecs/laravel-lang": "^3.0",
"caouecs/laravel-lang": "^6.0",
"elkuku/crowdin-api": "^2.0",
"laravel/framework": "^5.6",
"illuminate/console": "^5.6 || ^6.0 || ^7.0",
"illuminate/support": "^5.6 || ^6.0 || ^7.0",
"umpirsky/locale-list": "^1.0"
},
"require-dev": {
"dms/phpunit-arraysubset-asserts": "^0.2.0",
"laravel/framework": "^5.6 || ^6.0 || ^7.0",
"nunomaduro/larastan": "^0.5",
"orchestra/testbench": "^5.0",
"phpunit/phpunit": "^8.0 || ^9.0",
"thecodingmachine/phpstan-safe-rule": "^1.0",
"vimeo/psalm": "^3.9"
},
"autoload": {
"psr-4": {
"Gunther\\": "src",
Expand All @@ -37,10 +47,5 @@
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true,
"require-dev": {
"orchestra/testbench": "~3.0",
"phpunit/phpunit": "^7.3",
"vimeo/psalm": "^3.0"
}
"prefer-stable": true
}
Loading

0 comments on commit 5475571

Please sign in to comment.