Skip to content

Commit

Permalink
Merge pull request #2 from php-etl/remove-symfony-cache
Browse files Browse the repository at this point in the history
Remove symfony/cache
  • Loading branch information
clemzarch authored Apr 4, 2023
2 parents 1cdab2a + 284a33c commit 8ca954c
Show file tree
Hide file tree
Showing 12 changed files with 606 additions and 507 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/phpspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PHPSpec
on: push
jobs:
phpspec:
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-
- name: "Set COMPOSER_ROOT_VERSION environment variable"
uses: "ergebnis/composer-root-version-action@main"
with:
branch: "main"
- uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: pcov
- uses: php-actions/composer@v6
with:
args: --prefer-dist
php_version: '8.2'
- name: PHP Spec
run: bin/phpspec run spec
28 changes: 28 additions & 0 deletions .github/workflows/phpstan5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: PHPStan level 5
on: push
jobs:
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-
- name: "Set COMPOSER_ROOT_VERSION environment variable"
uses: "ergebnis/composer-root-version-action@main"
with:
branch: "main"
- uses: php-actions/composer@v6
with:
args: '--prefer-dist'
php_version: '8.2'
version: '2.3.10'
- name: PHPStan
uses: php-actions/phpstan@v3
with:
path: src/
level: 5
php_version: '8.2'
27 changes: 27 additions & 0 deletions .github/workflows/phpstan6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PHPStan level 6
on: push
jobs:
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-
- name: "Set COMPOSER_ROOT_VERSION environment variable"
uses: "ergebnis/composer-root-version-action@main"
with:
branch: "main"
- 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'
27 changes: 27 additions & 0 deletions .github/workflows/phpstan7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PHPStan level 7
on: push
jobs:
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-
- name: "Set COMPOSER_ROOT_VERSION environment variable"
uses: "ergebnis/composer-root-version-action@main"
with:
branch: "main"
- uses: php-actions/composer@v6
with:
args: '--prefer-dist'
php_version: '8.2'
- name: PHPStan
uses: php-actions/phpstan@v3
with:
path: src/
level: 7
php_version: '8.2'
27 changes: 27 additions & 0 deletions .github/workflows/phpstan8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PHPStan level 8
on: push
jobs:
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-
- name: "Set COMPOSER_ROOT_VERSION environment variable"
uses: "ergebnis/composer-root-version-action@main"
with:
branch: "main"
- 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'
43 changes: 18 additions & 25 deletions .github/workflows/actions.yml → .github/workflows/quality.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,40 @@
name: Quality
name: Quality (PHPStan level 3)
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'
- name: Cs-Fixer
run: |
wget -q https://cs.symfony.com/download/php-cs-fixer-v2.phar -O php-cs-fixer
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
strategy:
matrix:
phpstan-level: [ 3, 5, 7, 8 ]
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
- name: "Set COMPOSER_ROOT_VERSION environment variable"
uses: "ergebnis/composer-root-version-action@main"
with:
args: --prefer-dist
php_version: 8.0

branch: "main"
- uses: php-actions/composer@v6
with:
args: '--prefer-dist'
php_version: '8.2'
- name: PHPStan
uses: php-actions/phpstan@v2
uses: php-actions/phpstan@v3
with:
path: src/
args: --level=${{ matrix.phpstan-level }}

phpspec:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v5
with:
args: --prefer-dist
php_version: 8.0
- name: PHP Spec
run: bin/phpspec run spec
level: 3
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/phpspec-extension'
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]'
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.env
.idea/
vendor/
!.idea/runConfigurations
bin/
!.idea/runConfigurations
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^8.2",
"phpspec/phpspec": "^7.0",
Expand All @@ -23,8 +24,7 @@
"symfony/expression-language": "^5.2",
"symfony/inflector": "^5.2",
"symfony/property-access": "^5.2",
"symfony/cache": "^5.2",
"php-etl/metadata": "^0.3@dev"
"php-etl/metadata": "^0.3"
},
"autoload": {
"psr-4": {
Expand All @@ -43,7 +43,7 @@
},
"extra": {
"branch-alias": {
"dev-main": "0.3.x-dev"
"dev-main": "0.4.x-dev"
}
},
"require-dev": {
Expand Down
Loading

0 comments on commit 8ca954c

Please sign in to comment.