Github Actions used in projects of the WordPress team.
- PHPStan
- Dependabot (auto-merge)
- Markdown Lint
- Requires
.markdownlint.ymlin project root!
- Requires
- PHP CS Fixer
- Composer lock differance
- NPM lock differance
- Create an
.github/workflows/dir in your project root - Make a file workflow file with
.ymlsuffix, in this example we wil usephpstan.yml - Add the syntax below:
We reference the work flow in
name: PHPStan on: pull_request: paths: - '**.php' - 'phpstan.neon.dist' - '.github/workflows/phpstan.yml' jobs: phpstan: uses: yardinternet/workflows/.github/workflows/phpstan.yml@main secrets: inherit
useswith the following schema:{owner}/{repo}/.github/workflows/{filename}@{ref}. Also make sure to pass on the secrets:secrets: inherit.
When calling the run-laravel-testbench-tests.yml workflow one can use with to pass version settings.
jobs:
test:
uses: yardinternet/workflows/.github/workflows/run-laravel-testbench-tests.yml@main
with:
php-versions: '["8.2"]'
laravel-versions: '["10.*"]'
testbench-versions: '["8.*"]'
secrets: inheritThis alternative test runner can be used in packages that are not Laravel-based. When calling the run-pest-tests.yml workflow one can use with to pass version settings.
jobs:
test:
uses: yardinternet/workflows/.github/workflows/run-pest-tests.yml@main
with:
php-versions: '["8.2"]'
secrets: inherit