From aeb3cfd1eb075720d330134bd102b32d4560ca3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D1=80=D0=B0?= =?UTF-8?q?=D1=81=D0=B8=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2?= Date: Thu, 21 Nov 2024 23:22:51 +0300 Subject: [PATCH] GitLab.Actions --- .github/workflows/php.yml | 56 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 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..bb77f46 --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,56 @@ +name: Проверка + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + composer: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Проверка composer.json + run: composer validate --strict + + - name: Установка зависимостей + run: composer install --prefer-dist --no-progress + + phpunit: + name: Тесты PHPUnit + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + php-version: + - '8.0' + - '8.1' + - '8.2' + - '8.3' + dependency-versions: + - 'lowest' + - 'highest' + + steps: + - uses: actions/checkout@v3 + + - name: Настройка PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + coverage: none + + - name: Установка зависимостей + uses: ramsey/composer-install@v2 + with: + dependency-versions: ${{ matrix.dependency-versions }} + + - name: PHPUnit + run: vendor/bin/phpunit