Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feature/http-client-t…
Browse files Browse the repository at this point in the history
…est-coverage

# Conflicts:
#	.github/workflows/phpstan-5.yaml
#	.github/workflows/phpstan-7.yaml
#	.github/workflows/phpstan-8.yaml
#	.github/workflows/quality.yaml
#	composer.json
#	composer.lock
#	infection.json.dist
#	rector.php
#	src/Builder/AlternativeLookup.php
#	src/Builder/Capacity/Extractor/All.php
#	src/Builder/Capacity/Extractor/ListPerPage.php
#	src/Builder/Capacity/Loader/Upsert.php
#	src/Builder/Capacity/Lookup/All.php
#	src/Builder/Capacity/Lookup/ListPerPage.php
#	src/Builder/Client.php
#	src/Builder/ConditionalLookup.php
#	src/Builder/Extractor.php
#	src/Builder/Loader.php
#	src/Builder/Lookup.php
#	src/Capacity/Extractor/All.php
#	src/Capacity/Extractor/ListPerPage.php
#	src/Capacity/Lookup/All.php
#	src/Capacity/Lookup/Download.php
#	src/Capacity/Lookup/ListPerPage.php
#	src/Configuration.php
#	src/Configuration/Extractor.php
#	src/Configuration/Loader.php
#	src/Configuration/Lookup.php
#	src/Factory/Client.php
#	src/Factory/Extractor.php
#	src/Factory/Loader.php
#	src/Factory/Lookup.php
#	src/Factory/Search.php
#	tests/functional/Builder/BuilderTestCase.php
#	tests/functional/Capacity/Extractor/AllTest.php
#	tests/functional/Capacity/Extractor/ListPerPageTest.php
#	tests/functional/Capacity/Lookup/AllTest.php
#	tests/functional/Capacity/Lookup/DownloadTest.php
#	tests/functional/Capacity/Lookup/ListPerPageTest.php
#	tests/functional/Configuration/LookupTest.php
#	tests/functional/Factory/ExtractorTest.php
#	tests/functional/Factory/LoaderTest.php
#	tests/functional/Factory/LookupTest.php
#	tests/functional/Factory/Repository/ExtractorTest.php
#	tests/functional/Factory/Repository/LoaderTest.php
#	tests/functional/Factory/Repository/LookupTest.php
#	tests/functional/Mock/ExceptionBuilder.php
#	tests/functional/Mock/HttpClientBuilder.php
#	tests/functional/Mock/RequestMatcher/RequestMatcherBuilder.php
#	tests/functional/Mock/ResponseBuilder.php
#	tests/functional/ServiceTest.php
  • Loading branch information
clemzarch committed Aug 11, 2023
2 parents 303db3a + 93e913e commit 78d8dff
Show file tree
Hide file tree
Showing 81 changed files with 3,019 additions and 2,419 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/infection.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
name: Mutations
name: Infection
on: push
jobs:
infection:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
tools: composer:v2
coverage: pcov
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: '**/vendor'
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- uses: php-actions/composer@v5
- uses: php-actions/composer@v6
with:
args: --prefer-dist
php_version: 8.1
args: --prefer-dist --ignore-platform-reqs
php_version: '8.2'

- name: Infection
run: |
wget -q https://github.com/infection/infection/releases/download/0.26.10/infection.phar
wget -q https://github.com/infection/infection/releases/download/0.26.10/infection.phar.asc
wget -q https://github.com/infection/infection/releases/download/0.26.21/infection.phar
wget -q https://github.com/infection/infection/releases/download/0.26.21/infection.phar.asc
chmod +x infection.phar
./infection.phar
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/phpstan-5.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
name: PHPStan level 5
on: push
jobs:
phpstan:
phpstan5:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- 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@v5
- uses: php-actions/composer@v6
with:
args: --prefer-dist
php_version: 8.1

php_version: '8.2'
- name: PHPStan
uses: php-actions/phpstan@v2
uses: php-actions/phpstan@v3
with:
path: src/
args: --level=5
php_version: 8.1
level: 5
php_version: '8.2'
23 changes: 23 additions & 0 deletions .github/workflows/phpstan-6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: PHPStan level 6
on: push
jobs:
phpstan6:
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: 6
php_version: '8.2'
17 changes: 8 additions & 9 deletions .github/workflows/phpstan-7.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
name: PHPStan level 7
on: push
jobs:
phpstan:
phpstan7:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- 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@v5
- uses: php-actions/composer@v6
with:
args: --prefer-dist
php_version: 8.1

php_version: '8.2'
- name: PHPStan
uses: php-actions/phpstan@v2
uses: php-actions/phpstan@v3
with:
path: src/
args: --level=5
php_version: 8.1
level: 7
php_version: '8.2'
17 changes: 8 additions & 9 deletions .github/workflows/phpstan-8.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
name: PHPStan level 8
on: push
jobs:
phpstan:
phpstan8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- 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@v5
- uses: php-actions/composer@v6
with:
args: --prefer-dist
php_version: 8.1

php_version: '8.2'
- name: PHPStan
uses: php-actions/phpstan@v2
uses: php-actions/phpstan@v3
with:
path: src/
args: --level=5
php_version: 8.1
level: 8
php_version: '8.2'
30 changes: 30 additions & 0 deletions .github/workflows/phpunit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: PHPUnit
on: push
jobs:
phpunit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: composer:v2
coverage: pcov
- 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: Run tests & generate Coverage
run: bin/phpunit --coverage-html var/coverage

- name: Store coverage files
uses: actions/upload-artifact@v3
with:
path: var/coverage
51 changes: 13 additions & 38 deletions .github/workflows/quality.yaml
Original file line number Diff line number Diff line change
@@ -1,62 +1,37 @@
name: Quality
name: Quality (PHPStan lvl 4)
on: push
jobs:
cs-fixer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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
phpunit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer:v2
coverage: pcov
- uses: actions/cache@v2
with:
path: '**/vendor'
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- uses: php-actions/composer@v5
with:
args: --prefer-dist
php_version: 8.1

- name: Run tests & generate Coverage
run: bin/phpunit --configuration=phpunit.xml tests --coverage-html var/coverage --whitelist=src

- name: Store coverage files
uses: actions/upload-artifact@v2
with:
path: var/coverage

phpstan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- 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@v5
- uses: php-actions/composer@v6
with:
args: --prefer-dist
php_version: 8.1

php_version: '8.2'
- name: PHPStan
uses: php-actions/phpstan@v2
uses: php-actions/phpstan@v3
with:
path: src/
args: --level=4
php_version: 8.1
level: 4
php_version: '8.2'
32 changes: 32 additions & 0 deletions .github/workflows/rector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# github action that checks code with Rector
name: Rector

on: pull_request

jobs:
rector:
# Don't run on forks.
if: github.repository == 'php-etl/akeneo-plugin'
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v3

-
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none

- uses: "ramsey/composer-install@v2"

- run: bin/rector --ansi

-
# commit only to core contributors who have repository access
if: github.event.pull_request.head.repo.full_name == github.repository
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: '[rector] Rector fixes'
commit_author: 'GitHub Action <[email protected]>'
commit_user_email: '[email protected]'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/vendor/
/.php-cs-fixer.cache
/bin/
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PHP82Migration' => true,
'@PHP81Migration' => true,
'@PHP80Migration:risky' => true,
'@PHPUnit84Migration:risky' => true,
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
Akeneo Data Flows
===

[![Quality (PHPStan lvl 4)](https://github.com/php-etl/akeneo-plugin/actions/workflows/quality.yaml/badge.svg)](https://github.com/php-etl/akeneo-plugin/actions/workflows/quality.yaml)
[![PHPUnit](https://github.com/php-etl/akeneo-plugin/actions/workflows/phpunit.yaml/badge.svg)](https://github.com/php-etl/akeneo-plugin/actions/workflows/phpunit.yaml)
[![Infection](https://github.com/php-etl/akeneo-plugin/actions/workflows/infection.yaml/badge.svg)](https://github.com/php-etl/akeneo-plugin/actions/workflows/infection.yaml)
[![PHPStan level 5](https://github.com/php-etl/akeneo-plugin/actions/workflows/phpstan-5.yaml/badge.svg)](https://github.com/php-etl/akeneo-plugin/actions/workflows/phpstan-5.yaml)
[![PHPStan level 6](https://github.com/php-etl/akeneo-plugin/actions/workflows/phpstan-6.yaml/badge.svg)](https://github.com/php-etl/akeneo-plugin/actions/workflows/phpstan-6.yaml)
[![PHPStan level 7](https://github.com/php-etl/akeneo-plugin/actions/workflows/phpstan-7.yaml/badge.svg)](https://github.com/php-etl/akeneo-plugin/actions/workflows/phpstan-7.yaml)
[![PHPStan level 8](https://github.com/php-etl/akeneo-plugin/actions/workflows/phpstan-8.yaml/badge.svg)](https://github.com/php-etl/akeneo-plugin/actions/workflows/phpstan-8.yaml)
![PHP](https://img.shields.io/packagist/php-v/php-etl/akeneo-plugin)

Goal
---

This package aims at integration the Akeneo PHP clients into the
[Pipeline](https://github.com/php-etl/pipeline) stack. This integration is
compatible with both [Akeneo Enterprise Edition client](https://github.com/akeneo/api-php-client-ee)
and the [Akeneo Community Edition client](https://github.com/akeneo/api-php-client)
compatible with the [Akeneo client](https://github.com/akeneo/api-php-client)

Principles
---
Expand Down
Loading

0 comments on commit 78d8dff

Please sign in to comment.