Skip to content
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
34 changes: 0 additions & 34 deletions .github/workflows/infection.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/phpstan-5.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/phpstan-6.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/phpstan-7.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/phpstan-8.yaml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/phpunit.yaml

This file was deleted.

109 changes: 75 additions & 34 deletions .github/workflows/quality.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,78 @@
name: Quality
on: push

on:
push:
branches: [main, master, next]
pull_request:
branches: [main, master, next]

env:
PHP_VERSION: '8.4'

jobs:
cs-fixer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Cs-Fixer
run: |
wget -q https://cs.symfony.com/download/php-cs-fixer-v3.phar -O php-cs-fixer
chmod a+x php-cs-fixer
PHP_CS_FIXER_IGNORE_ENV=true ./php-cs-fixer fix --dry-run --config=.php-cs-fixer.dist.php

phpstan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: '**/vendor'
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- uses: php-actions/composer@v6
with:
args: --prefer-dist
php_version: '8.2'

- name: PHPStan
uses: php-actions/phpstan@v3
with:
path: src/
args: --level=4
quality:
name: PHP-CS-Fixer, PHPStan, Rector, PHPUnit, Infection, PHPSpec
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
tools: composer:v2
coverage: pcov

- uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock', 'composer.json') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-interaction --prefer-dist

- name: PHP-CS-Fixer
run: |
if [ -f vendor/bin/php-cs-fixer ] && [ -d src ]; then
vendor/bin/php-cs-fixer fix src --dry-run
fi

- name: PHPStan
run: |
if [ ! -d src ]; then exit 0; fi
if [ -f vendor/bin/phpstan ]; then
vendor/bin/phpstan analyse src --level=8 --no-progress
elif [ -f vendor/phpstan/phpstan/phpstan ]; then
php vendor/phpstan/phpstan/phpstan analyse src --level=8 --no-progress
fi

- name: Rector
run: |
if [ -f bin/rector ]; then
bin/rector process --dry-run
elif [ -f vendor/bin/rector ]; then
vendor/bin/rector process --dry-run
fi

- name: PHPUnit
run: |
if [ -f phpunit.xml ] || [ -f phpunit.xml.dist ]; then
if [ -f infection.json ] || [ -f infection.json.dist ]; then
vendor/bin/phpunit --coverage-html var/coverage --coverage-text
else
vendor/bin/phpunit
fi
fi

- name: Infection
run: |
if [ -f infection.json ] || [ -f infection.json.dist ]; then
vendor/bin/infection run --no-progress --min-msi=0 --min-covered-msi=0
fi

- name: PHPSpec
run: |
if [ -f bin/phpspec ] && [ -d spec ]; then
bin/phpspec run spec
fi
30 changes: 0 additions & 30 deletions .github/workflows/rector.yaml

This file was deleted.

11 changes: 8 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"name": "php-etl/sql-plugin",
"repositories": [
{"type": "path", "url": "../fast-map"},
{"type": "path", "url": "../../tools/fast-map-config"},
{"type": "path", "url": "../../phpunit-extension"}
],
"description": "This plugin allows you to perform SQL queries in the ETL pipelines",
"type": "gyroscops-plugin",
"license": "MIT",
Expand All @@ -25,12 +30,12 @@
"ext-pdo": "*",
"phpunit/phpunit": "^10.0",
"php-etl/phpunit-extension": "*",
"phpstan/phpstan": "^2.2",
"phpstan/phpstan": "^2.1",
"php-etl/sql-flow": "*",
"friendsofphp/php-cs-fixer": "^3.0",
"mikey179/vfsstream": "^1.6",
"infection/infection": "^0.26.18",
"rector/rector": "^2.0"
"infection/infection": "^0.28",
"rector/rector": "^2.3"
},
"autoload": {
"psr-4": {
Expand Down
Loading