Add badges for workflows

This commit is contained in:
Sebastian Meyer 2023-11-21 22:17:39 +01:00
parent 0267c99d92
commit f7a40f9b4a
4 changed files with 19 additions and 10 deletions

View File

@ -7,7 +7,6 @@ updates:
assignees:
- "sebastian-meyer"
labels: [ ]
- package-ecosystem: "github-actions"
directory: "/"
schedule:

View File

@ -1,19 +1,17 @@
name: PHPMD
name: PHP Mess Detector
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '00 03 * * 1'
permissions:
contents: read
jobs:
PHPMD:
name: Run PHPMD Scanning
name: Run PHPMD Scanner
runs-on: ubuntu-latest
permissions:
contents: read
@ -27,7 +25,7 @@ jobs:
- name: Setup Environment
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: "8.0"
coverage: none
tools: phpmd

View File

@ -1,4 +1,4 @@
name: PHPStan
name: PHP Static Analyzer
on:
push:
@ -6,20 +6,29 @@ on:
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
phpstan:
PHPStan:
name: Run PHPStan Scanner
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
- name: Install Dependencies
- name: Setup Environment
uses: php-actions/composer@v6
with:
command: update
php_version: "8.0"
- name: PHPStan Static Analysis
- name: Run PHPStan
uses: php-actions/phpstan@v3
with:
path: src/

View File

@ -1,3 +1,6 @@
# Useful PHP Basics
[![PHPStan](https://github.com/opencultureconsulting/php-basics/actions/workflows/phpstan.yml/badge.svg)](https://github.com/opencultureconsulting/php-basics/actions/workflows/phpstan.yml)
[![PHPMD](https://github.com/opencultureconsulting/php-basics/actions/workflows/phpmd.yml/badge.svg)](https://github.com/opencultureconsulting/php-basics/actions/workflows/phpmd.yml)
This is a collection of generic [Classes](https://www.php.net/manual/en/language.oop5.php), [Functions](https://www.php.net/manual/en/language.functions.php) and useful [Traits](https://www.php.net/manual/en/language.oop5.traits.php) for your PHP projects.