From d9827e37fe112f8def5dec9001595098df1bf6d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Mejer?= Date: Sat, 23 Nov 2024 20:41:27 +0100 Subject: [PATCH] Create php.yml --- .github/workflows/php.yml | 59 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/php.yml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..5746e67 --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,59 @@ +name: PHP Composer + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + tests: + + runs-on: ubuntu-latest + + strategy: + matrix: + composer: [highest, lowest] + php-versions: ['8.4'] + + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP with PECL extension + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + + - uses: "ramsey/composer-install@v3" + with: + dependency-versions: ${{ matrix.composer }} + + - name: Run Pest + run: ./vendor/bin/pest + + pint: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP with PECL extension + uses: shivammathur/setup-php@v2 + with: + php-version: '8.4' + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Run Ping + run: ./vendor/bin/pint --test