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.

30 changes: 0 additions & 30 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 (PHPStan lvl 3)
on: push
name: Quality

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

env:
PHP_VERSION: '8.4'

jobs:
cs-fixer:
quality:
name: PHP-CS-Fixer, PHPStan, Rector, PHPUnit, Infection, PHPSpec
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none
- 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 src --dry-run

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/
level: 8
php_version: '8.2'
- 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
31 changes: 0 additions & 31 deletions .github/workflows/rector.yaml

This file was deleted.

9 changes: 6 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"name": "php-etl/fast-map-plugin",
"repositories": [
{"type": "path", "url": "../../tools/fast-map-config"}
],
"description": "Adapters for the Fast Map mapping library",
"type": "gyroscops-plugin",
"license": "MIT",
Expand All @@ -26,9 +29,9 @@
"phpunit/php-invoker": "*",
"php-etl/phpunit-extension": "*",
"friendsofphp/php-cs-fixer": "^3.38",
"phpstan/phpstan": "^2.2",
"rector/rector": "^2.0",
"infection/infection": "^0.26",
"phpstan/phpstan": "^2.1",
"rector/rector": "^2.3",
"infection/infection": "^0.28",
"php-etl/bucket": "*"
},
"autoload": {
Expand Down
Loading