Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stefanzweifel/laravel-phpinsights-action
Run PHP Insights in Laravel in Github Actions
https://github.com/stefanzweifel/laravel-phpinsights-action
github-action github-actions laravel php phpinsights
Last synced: 28 days ago
JSON representation
Run PHP Insights in Laravel in Github Actions
- Host: GitHub
- URL: https://github.com/stefanzweifel/laravel-phpinsights-action
- Owner: stefanzweifel
- License: mit
- Created: 2019-06-10T12:25:15.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-14T05:30:28.000Z (over 4 years ago)
- Last Synced: 2024-04-14T05:54:54.540Z (7 months ago)
- Topics: github-action, github-actions, laravel, php, phpinsights
- Language: Dockerfile
- Size: 10.7 KB
- Stars: 21
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# laravel-phpinsights-action
> [!WARNING]
> This Action has been archived.
> If you want to run [phpinsights](https://github.com/nunomaduro/phpinsights) in your project, you can achieve this by using a simple workflow like this.```yaml
name: PHP Insights
on: push
jobs:
phpinsights:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3- uses: shivammathur/setup-php@v2
- uses: ramsey/composer-install@v3
- name: Run phpinsights
run: php artisan insights -n
```---
This GitHub Action executes Laravel Artisan Command of [phpinsights](https://github.com/nunomaduro/phpinsights). The output of the Insights Command can be viewed in the Actions log.
You can optionally define minimum values for Insights categories. If the value falls below your given threshold, the run fails.
### Usage
This Action doesn't install composer dependencies on it's own and doesn't contain a `phpinsights` binary.
It's therefore required that `phpinsights` is set as a dependency in your project and that another Action installs the composer dependencies.
An example Workflow can look like this.
```yaml
name: PHP Insightson: push
jobs:
phpinsights:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1- uses: MilesChou/composer-action@master
with:
args: install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist- uses: stefanzweifel/[email protected]
```### Arguments
You can pass any valid `phpinsights` argument to the Action. In this example, all issues are always displayed and a minimum value of 80 has to be achieved in all categories.
```yaml
name: PHP Insightson: push
jobs:
phpinsights:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1- uses: MilesChou/composer-action@master
with:
args: install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist- uses: stefanzweifel/[email protected]
with:
args: -v --min-quality=80 --min-complexity=80 --min-architecture=80 --min-style=80 --disable-security-check
```## Versioning
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/stefanzweifel/laravel-phpinsights-action/tags).
## License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/stefanzweifel/laravel-phpinsights-action/blob/master/LICENSE) file for details.