This repository contains reusable GitHub Actions workflows for PHP projects.
A reusable workflow for PHP projects that runs PHPUnit tests across multiple PHP versions and dependency combinations.
name: Continuous Integration
on:
push:
pull_request:
workflow_dispatch:
jobs:
tests:
uses: ray-di/.github/.github/workflows/continuous-integration.yml@v1
with:
old_stable: '["8.1", "8.2", "8.3"]'
current_stable: "8.4"
Name | Description | Required | Type |
---|---|---|---|
old_stable |
JSON array of PHP versions to test | Yes | string |
current_stable |
Current stable PHP version | Yes | string |
script |
Additional PHP script to run | No | string |
- Runs tests on multiple PHP versions
- Handles both highest and lowest dependencies
- Includes code coverage reporting to Codecov
- Caches Composer dependencies
- Tests on both Ubuntu and Windows (for current stable PHP version)
- Configurable additional script execution
The workflow runs tests with the following combinations:
- All PHP versions from
old_stable
on Ubuntu with both highest and lowest dependencies - Current stable PHP version on:
- Ubuntu (highest dependencies)
- Ubuntu (lowest dependencies)
- Windows (highest dependencies)