From a8cacd1db36303dd4440f94704f74a6dbcf58b06 Mon Sep 17 00:00:00 2001 From: Tobias Feijten Date: Fri, 27 Dec 2024 16:15:09 +0100 Subject: [PATCH] Add PHPUnit test action --- .github/workflows/phpunit.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/phpunit.yml diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml new file mode 100644 index 0000000..fde8793 --- /dev/null +++ b/.github/workflows/phpunit.yml @@ -0,0 +1,35 @@ +name: PHPUnit tests +on: + push + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + php: [ '8.1', '8.2', '8.3', '8.4' ] + name: On PHP ${{ matrix.php }} + + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP ${{ matrix.php }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + + - name: Install dependencies (latest) + run: composer install --prefer-dist --no-progress + + - name: Run test suite (latest) + run: ./vendor/bin/phpunit + + - name: Install dependencies (lowest) + run: composer update --prefer-lowest --no-progress + + - name: Run test suite (lowest) + run: ./vendor/bin/phpunit