Skip to content
Compare
Choose a tag to compare
@JackNoordhuis JackNoordhuis released this 25 Jan 05:56
· 20 commits to 1.x since this release

GitHub action for running PHPStan analysis against PocketMine-MP
plugins and libraries in actions workflows. See setup-pmmp-phpstan-env-action for descriptions on provided phpstan.neon configurations.

How to use

Simple analysis of PocketMine plugins and libraries on GitHub Actions:

name: My PMMP Plugin Workflow
on: [ push ]
jobs:
  test-code:
    name: Run Plugin Tests
    runs-on: ubuntu-20.04 # pmmp-php-build doesn't work on ubuntu-latest yet
    steps:
      - name: Checkout source code
        uses: actions/checkout@v3
      - name: Run PHPStan
        uses: nxtlvlsoftware/run-phpstan-pmmp-action@v1

Or to lock the versions of any required tools/executables to known versions:

name: My PMMP Plugin Workflow
on: [ push ]
jobs:
  test-code:
    name: Run Plugin Tests
    runs-on: ubuntu-20.04 # pmmp-php-build doesn't work on ubuntu-latest yet
    steps:
      - name: Checkout source code
        uses: actions/checkout@v3
      - uses: nxtlvlsoftware/run-phpstan-pmmp-action@v1
        with:
          analyse: src
          config: tests/phpstan/action.phpstan.neon
          level: 9
          php-version: 8.0.18
          phpstan-version: 1.8.2
          pmmp-version: 4.6.1

License

nxtlvlsoftware/run-phpstan-pmmp-action is open-sourced software licensed under the MIT license.