Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions .github/workflows/php.yml

This file was deleted.

89 changes: 89 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Test


on:
push:
branches: [ "master", "dev" ]
pull_request:
branches: [ "master", "dev" ]

permissions:
contents: read

jobs:

test:
#name: PHP ${{ matrix.php-version }}
name: PHP ${{ matrix.php }} - ${{ matrix.phpunit }} - ${{ matrix.stability }}
runs-on:
# group: xmis
labels: [self-hosted, k3s]
strategy:
fail-fast: true
matrix:
php: [8.3, 8.4]
phpunit: ['9.6.16']
# stability: [prefer-lowest, prefer-stable]
stability: [prefer-dist]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
run: |
# Используем уже установленный PHP
php${{ matrix.php }} --version
update-alternatives --set php /usr/bin/php${{ matrix.php }}
composer --version
# Устанавливаем php.ini настройки
echo "error_reporting = E_ALL" >> /etc/php/${{ matrix.php }}/cli/php.ini
# - name: Setup PHP
# # https://github.com/shivammathur/setup-php
# uses: shivammathur/setup-php@v2
# with:
# php-version: ${{ matrix.php }}
# extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, :php-psr #sqlite, pdo_sqlite, gd, redis, igbinary, msgpack, lzf, zstd, lz4, memcached, gmp,
# ini-values: error_reporting=E_ALL
# tools: composer:v2
# coverage: none
#env:
#REDIS_CONFIGURE_OPTS: --enable-redis --enable-redis-igbinary --enable-redis-msgpack --enable-redis-lzf --with-liblzf --enable-redis-zstd --with-libzstd --enable-redis-lz4 --with-liblz4
#REDIS_LIBS: liblz4-dev, liblzf-dev, libzstd-dev

# - name: Validate composer.json and composer.lock
# run: composer validate --strict

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
#key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
#restore-keys: ${{ runner.os }}-composer-
key: ${{ runner.os }}-composer-${{ matrix.prefer }}-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}-

# - name: Install dependencies
# run: composer install --prefer-dist

- name: Set PHPUnit
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 10
command: composer require phpunit/phpunit:^${{ matrix.phpunit }} --dev --no-interaction --no-update

- name: Install dependencies
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 10
command: composer update --${{ matrix.stability }} --no-interaction --no-progress

- name: Run Tests
run: vendor/bin/phpunit

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ build/*
phpunit.xml
.php_cs.cache
.php_cs.result.cache
/.phpunit.result.cache
/composer.lock
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
}
],
"require": {
"php": ">= 8.2",
"php": ">= 8.3",
"ext-json": "*",
"symfony/process": "^6.3",
"lstrojny/hmmmath": ">=0.5.0",
"guzzlehttp/guzzle": "^7.8",
"kohanaworld/hmmmath": ">=0.9.0",
"guzzlehttp/guzzle": "8.0.x-dev",
"slim/slim": "^4.12",
"friendsofphp/php-cs-fixer": "^3.16",
"charescape/serialize-closure": "^3.8",
"laravel/serializable-closure": "^2.0.4",
"pimple/pimple": "^3.5",
"fig/http-message-util": "^1.1"
},
Expand Down
Loading