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: assignees:
- "sebastian-meyer" - "sebastian-meyer"
labels: [ ] labels: [ ]
- package-ecosystem: "github-actions" - package-ecosystem: "github-actions"
directory: "/" directory: "/"
schedule: schedule:

View File

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

View File

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

View File

@ -1,3 +1,6 @@
# Useful PHP Basics # 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. 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.