From d7080e4d34becc246ceae4f4aab1580c11e9e345 Mon Sep 17 00:00:00 2001 From: Joe Hoyle Date: Wed, 20 Aug 2025 11:06:27 -0400 Subject: [PATCH] Add Github Actions example Fixes https://github.com/humanmade/plugin-tester/issues/13 --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index de01f6e..168be97 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,33 @@ tests_add_filter( 'muplugins_loaded', function () { require '/wp-phpunit/includes/bootstrap.php'; ``` +## Continuous Integration with Github Actions + +For Github Actions, you can use a workflow such as: + + +```yaml +name: Test + +on: + push: + branches: [ master ] + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies + run: docker run --rm -v $PWD:/code --entrypoint='' humanmade/plugin-tester composer install + + - name: Run tests + run: docker run --rm -v $PWD:/code humanmade/plugin-tester +``` + ## Continuous Integration with Travis For Travis, the following minimal configuration will get your tests running: