Skip to content

ohseesoftware/github-actions-php-package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

GitHub Actions - PHP Package

Boilerplate workflow for a PHP package.

Overview

This is a workflow with two jobs:

  • Test
  • Release

The Test job runs on every push and will:

  • Install composer dependencies
  • Run PHP CS on the src and tests directories
  • Run PHP Unit

The Release job runs on the master branch, only if the Test job runs successfully, and it will:

  • Run semantic-release to handle the release process

Setup

This boilerplate assumes a few things:

  • The phpcs package is installed in the project: composer require --dev "squizlabs/php_codesniffer=*". Our recommended PHP CS configuration can be found here.
  • The phpunit package is installed in the project: composer require --dev phpunit/phpunit
  • The project uses semantic-release for the release project. It uses npx, so you don't have to install anything into the project. You can use a .releaserc file in the root of the project to configure semantic-release.

Releases

No releases published

Packages

No packages published