Skip to content

Commit

Permalink
build: add quality github action to run style, analyze and rector scr…
Browse files Browse the repository at this point in the history
…ipts

- update readme badges
- add github action vscode extension to devcontainer
  • Loading branch information
yassinedoghri committed Sep 22, 2024
1 parent 976acbd commit 58dc049
Show file tree
Hide file tree
Showing 5 changed files with 940 additions and 226 deletions.
5 changes: 3 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@
"breezelin.phpstan",
"eamodio.gitlens",
"esbenp.prettier-vscode",
"GitHub.vscode-github-actions",
"pflannery.vscode-versionlens",
"streetsidesoftware.code-spell-checker",
"yzhang.markdown-all-in-one",
"wayou.vscode-todo-highlight"
"wayou.vscode-todo-highlight",
"yzhang.markdown-all-in-one"
]
}
}
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: php-icons-quality

on:
push:
branches: [develop, main]
pull_request:
branches: [develop, main]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: 🛎️ Checkout
uses: actions/checkout@v4

- name: 🐘 Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2

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

- name: 🗂️ Cache Composer packages
id: composer-cache
uses: actions/cache@v3
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

- name: ✨ Quality check
run: |
composer run-script style
composer run-script analyze
composer run-script rector
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# PHPIcons 🐘 🙂

[![Latest Stable Version](http://poser.pugx.org/yassinedoghri/php-icons/v)](https://packagist.org/packages/yassinedoghri/php-icons)
[![Total Downloads](http://poser.pugx.org/yassinedoghri/php-icons/downloads)](https://packagist.org/packages/yassinedoghri/php-icons)
[![Latest Unstable Version](http://poser.pugx.org/yassinedoghri/php-icons/v/unstable)](https://packagist.org/packages/yassinedoghri/php-icons)
[![Latest Stable Version](https://poser.pugx.org/yassinedoghri/php-icons/v)](https://packagist.org/packages/yassinedoghri/php-icons)
[![Total Downloads](https://poser.pugx.org/yassinedoghri/php-icons/downloads)](https://packagist.org/packages/yassinedoghri/php-icons)
[![Latest Unstable Version](https://poser.pugx.org/yassinedoghri/php-icons/v/unstable)](https://packagist.org/packages/yassinedoghri/php-icons)
[![License](https://img.shields.io/github/license/yassinedoghri/php-icons?color=green)](https://packagist.org/packages/yassinedoghri/php-icons)
[![PHP Version Require](http://poser.pugx.org/yassinedoghri/php-icons/require/php)](https://packagist.org/packages/yassinedoghri/php-icons)
[![PHP Version Require](https://poser.pugx.org/yassinedoghri/php-icons/require/php)](https://packagist.org/packages/yassinedoghri/php-icons)

**A convenient PHP library to render svg icons.**

Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "yassinedoghri/php-icons",
"version": "1.0.0-dev",
"description": "A PHP library based on iconify's API to download and render svg icons from popular open source icon sets.",
"description": "A convenient PHP library to render svg icons.",
"type": "library",
"license": "MIT",
"authors": [
Expand All @@ -17,7 +16,7 @@
],
"scripts": {
"dev": "php -S 0.0.0.0:8000",
"analyse": "vendor/bin/phpstan analyse --ansi",
"analyze": "vendor/bin/phpstan analyse --ansi",
"rector": "vendor/bin/rector process --dry-run --ansi",
"rector:fix": "vendor/bin/rector process --ansi",
"style": "vendor/bin/ecs check --ansi",
Expand Down
Loading

0 comments on commit 58dc049

Please sign in to comment.