diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 65729db..0d4f4a8 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -2,26 +2,25 @@ name: "Check Coding Standards" on: pull_request: - push: jobs: coding-standards: name: "Check Coding Standards" - runs-on: "ubuntu-latest" + runs-on: ubuntu-latest steps: - - name: "Checkout" - uses: "actions/checkout@v3" + - name: Checkout + uses: actions/checkout@v4 - - name: "Setup PHP" - uses: "shivammathur/setup-php@v2" + - name: Setup PHP + uses: shivammathur/setup-php@v2 with: php-version: "7.4" tools: composer:v2, cs2pr - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress --no-suggest" + - name: Install dependencies + run: composer install --no-interaction --no-progress - - name: "Run phpcs" + - name: Run phpcs run: vendor/bin/phpcs -q --report=checkstyle | cs2pr diff --git a/.github/workflows/phpmd.yml b/.github/workflows/phpmd.yml index fca81c9..4854690 100644 --- a/.github/workflows/phpmd.yml +++ b/.github/workflows/phpmd.yml @@ -2,26 +2,25 @@ name: "Check phpmd" on: pull_request: - push: jobs: coding-standards: name: "Check phpmd" - runs-on: "ubuntu-latest" + runs-on: ubuntu-latest steps: - - name: "Checkout" - uses: "actions/checkout@v3" + - name: Checkout + uses: actions/checkout@v4 - - name: "Setup PHP" - uses: "shivammathur/setup-php@v2" + - name: Setup PHP + uses: shivammathur/setup-php@v2 with: php-version: "7.4" tools: composer:v2 - - name: "Install dependencies" - run: "composer require phpmd/phpmd --no-interaction --no-progress --no-suggest" + - name: Install dependencies + run: composer require phpmd/phpmd --no-interaction --no-progress - - name: "Run phpmd" + - name: Run phpmd run: vendor/bin/phpmd classes/ text cleancode,codesize,controversial,design,naming,unusedcode diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 8fe3fc9..db07427 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -2,13 +2,18 @@ name: "PHPUnit tests" on: pull_request: - push: + schedule: + - cron: "0 0 * * *" + +concurrency: + group: ${{ github.head_ref || 'cron' }} + cancel-in-progress: true jobs: phpunit: name: PHPUnit tests on PHP ${{ matrix.php-version }} - runs-on: "ubuntu-latest" + runs-on: ubuntu-latest strategy: matrix: @@ -21,19 +26,19 @@ jobs: - "8.2" steps: - - name: "Checkout" - uses: "actions/checkout@v3" + - name: Checkout + uses: actions/checkout@v4 - - name: "Install PHP" - uses: "shivammathur/setup-php@v2" + - name: Install PHP + uses: shivammathur/setup-php@v2 with: coverage: "pcov" php-version: "${{ matrix.php-version }}" ini-values: memory_limit=-1 tools: composer:v2 - - name: "Cache dependencies" - uses: "actions/cache@v2" + - name: Cache dependencies + uses: actions/cache@v3 with: path: | ~/.composer/cache @@ -41,8 +46,8 @@ jobs: key: "php-${{ matrix.php-version }}" restore-keys: "php-${{ matrix.php-version }}" - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress --no-suggest" + - name: Install dependencies + run: composer install --no-interaction --no-progress - - name: "Tests" + - name: Tests run: vendor/bin/phpunit diff --git a/.github/workflows/test-flight.yml b/.github/workflows/test-flight.yml index dd84e25..ee7fa92 100644 --- a/.github/workflows/test-flight.yml +++ b/.github/workflows/test-flight.yml @@ -8,23 +8,23 @@ jobs: coding-standards: name: "Check test-flight" - runs-on: "ubuntu-latest" + runs-on: ubuntu-latest steps: - - name: "Checkout" - uses: "actions/checkout@v3" + - name: Checkout + uses: actions/checkout@v4 - - name: "Setup PHP" - uses: "shivammathur/setup-php@v2" + - name: Setup PHP + uses: shivammathur/setup-php@v2 with: php-version: "7.4" tools: composer:v2 ini-values: "zend.assertions=1" - - name: "Install dependencies" - run: "composer require cundd/test-flight --no-interaction --no-progress --no-suggest" + - name: Install dependencies + run: composer require cundd/test-flight --no-interaction --no-progress - - name: "Run test-flight" + - name: Run test-flight run: | vendor/bin/test-flight README.md vendor/bin/test-flight classes/ diff --git a/composer.json b/composer.json index ada71fe..f21066e 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ }, "require-dev": { "phpunit/phpunit": "^8.5.13 || ^9.5", - "squizlabs/php_codesniffer": "^3.5" + "phpcsstandards/php_codesniffer": "^3.5" }, "archive": { "exclude": ["/tests"]