Skip to content

v1.5.0

v1.5.0 #289

Workflow file for this run

name: PHP Composer
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.0', '8.1', '8.2', '8.3', '8.4']
name: PHP ${{ matrix.php-versions }} Test
steps:
- uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
- name: Run test suite
run: composer run-script test
- name: Run PHPStan
run: composer phpstan
create-class-diagram:
runs-on: ubuntu-latest
name: Create class diagram
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create class diagram
id: create-class-diagram
uses: smeghead/php-class-diagram-gh-action@v0
with:
target-path: src/DiagramElement
output-path: php-class-diagram.svg
target-repo: ${{ github.repository }}
target-branch: ${{ github.ref_name }}
options: --hide-private-methods
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: Class_Diagram
path: php-class-diagram.svg
retention-days: 5