Compliance
Compliance Automation for PHP - Automatically configure and execute multiple CI/CD
& QA Testing
tools on any platform via GitHub Action
.
Warning
This project is not finished yet, work in progress.
Workflow
# .github/workflows/compliance.yml
name: Compliance
on:
pull_request:
branches:
- "**"
push:
branches:
- "main"
- "[0-9]+.[0-9]+.x" # 1.2.x
- "v[0-9]+" # v1
workflow_dispatch: # Manually Trigger workflow
jobs:
automation:
uses: ghostwriter/compliance/.github/workflows/automation.yml@v1
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
INFECTION_DASHBOARD_API_KEY: ${{ secrets.INFECTION_DASHBOARD_API_KEY }}
Installation
You can install the package via composer:
composer require ghostwriter/compliance --dev
Usage
# Create `.github/workflows/compliance.yml` workflow file
compliance workflow
# Create `./compliance.php` configuration file
compliance config
# Determine CI Jobs for GitHub Actions
compliance matrix
# Executes a specific Job
compliance check {job}
Docker
# Install from the command line:
docker pull ghcr.io/ghostwriter/compliance:v1
# Usage from the command line:
docker run -v $(PWD):/app -w=/app ghcr.io/ghostwriter/compliance workflow
docker run -v $(PWD):/app -w=/app ghcr.io/ghostwriter/compliance config
docker run -v $(PWD):/app -w=/app ghcr.io/ghostwriter/compliance matrix
docker run -v $(PWD):/app -w=/app ghcr.io/ghostwriter/compliance check {job}
# Use as base image in Dockerfile:
FROM ghcr.io/ghostwriter/compliance:v1
Supported Tools
Ghostwriter\Compliance\Tool\ComposerRequireChecker;
Ghostwriter\Compliance\Tool\ECS;
Ghostwriter\Compliance\Tool\Infection;
Ghostwriter\Compliance\Tool\PHPBench;
Ghostwriter\Compliance\Tool\PHPCS;
Ghostwriter\Compliance\Tool\PHPCSFixer;
Ghostwriter\Compliance\Tool\PHPUnit;
Ghostwriter\Compliance\Tool\Psalm;
Ghostwriter\Compliance\Tool\Rector;
Testing
composer test
Changelog
Please see CHANGELOG.md for more information what has changed recently.
Security
If you discover any security related issues, please email nathanael.esayeas@protonmail.com
instead of using the issue tracker.
Sponsors
Credits
License
The BSD-3-Clause. Please see License File for more information.