Skip to content

deps: add PHP8 runner #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 11, 2023
Merged
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
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Everli PHP CI

on:
workflow_dispatch:
pull_request:
paths-ignore: ['**.md']

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.head_ref }}
cancel-in-progress: true

jobs:
static-analysis-check:
name: Static Analysis for PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: [7.2, 8.0]
env:
extensions: imagick, zip, pdo_mysql, sockets, pcntl, bcmath, soap, gd
key: extensions-v1
fail-fast: true

steps:
- name: Checkout
uses: actions/checkout@main

- name: Cache extensions
uses: shivammathur/cache-extensions@master
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}

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

- name: Cache dependencies
uses: actions/cache@main
id: cache-dependencies
with:
path: |
${{ steps.composer-cache.outputs.dir }}
vendor
.cache
key: ${{ runner.os }}-composer-${{ matrix.php-versions }}${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.extensions }}
coverage: none
tools: composer:v2

- name: Install dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: composer install --no-ansi --no-interaction --no-progress

- name: Run linters
run: composer --no-ansi test-style
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
.vscode

# Laravel
composer.lock
_ide_helper.php
.phpstorm.meta.php
.env
Expand Down
4 changes: 2 additions & 2 deletions build/test_style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

COMMANDS=(
"vendor/bin/phpmd src text phpmd.xml"
"vendor/bin/phpmnd --no-ansi --strings --hint --progress --non-zero-exit-on-violation src"
"vendor/bin/phpmnd --no-ansi --strings --hint --progress src"
"vendor/bin/phpcs -ps --error-severity=1 --warning-severity=1 --cache=.cache/phpcs src"
"vendor/bin/phpstan analyse --no-ansi --no-interaction --memory-limit=2G --level=max src"
"vendor/bin/phpstan analyse --configuration=phpstan.neon --no-ansi --no-interaction --no-progress --memory-limit=2G src"
"vendor/bin/psalm --monochrome --no-progress"
)

Expand Down
33 changes: 15 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "15.0.0",
"version": "15.1.0",
"name": "vladimir-yuldashev/laravel-queue-rabbitmq",
"description": "RabbitMQ driver for Laravel Queue. Supports Laravel Horizon",
"license": "MIT",
Expand All @@ -14,24 +14,24 @@
}
],
"require": {
"php": "7.2.*",
"php": "7.2.* || 8.0.*",
"ext-json": "*",
"illuminate/database": "6.20.*",
"illuminate/support": "6.20.*",
"illuminate/queue": "6.20.*",
"illuminate/database": "6.20.* || 9.*",
"illuminate/support": "6.20.* || 9.*",
"illuminate/queue": "6.20.* || 9.*",
"enqueue/amqp-lib": "0.10.*",
"queue-interop/amqp-interop": "0.8.*"
},
"require-dev": {
"phpunit/phpunit": "8.5.*",
"illuminate/events": "6.20.*",
"mockery/mockery": "1.3.*",
"phpmd/phpmd": "2.10.*",
"phpstan/phpstan": "0.12.*",
"phpstan/phpstan-strict-rules": "0.12.*",
"povils/phpmnd": "2.4.*",
"squizlabs/php_codesniffer": "3.6.*",
"vimeo/psalm": "4.13.*"
"phpunit/phpunit": "8.5.* || 9.5.*",
"illuminate/events": "6.20.* || 9.*",
"mockery/mockery": "1.3.* || 1.5.*",
"phpmd/phpmd": "2.13.*",
"phpstan/phpstan": "0.12.* || 1.9.*",
"phpstan/phpstan-strict-rules": "0.12.* || 1.4.*",
"povils/phpmnd": "2.5.* || 3.0.*",
"squizlabs/php_codesniffer": "3.7.*",
"vimeo/psalm": "4.30.* || 5.4.*"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -63,9 +63,6 @@
"preferred-install": "dist",
"apcu-autoloader": true,
"optimize-autoloader": true,
"sort-packages": true,
"platform": {
"php": "7.2.24"
}
"sort-packages": true
}
}
Loading