Skip to content

Commit

Permalink
TASK: Use ramsey/composer-install@v2
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbelasichon committed May 24, 2023
1 parent 8ed9d9e commit 06295f1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 59 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/code_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,12 @@ jobs:
steps:
- uses: actions/checkout@v3

- id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none

- run: composer install --no-progress
- uses: "ramsey/composer-install@v2"

- run: |
phpdbg -qrr -d memory_limit=-1 vendor/bin/phpunit --coverage-clover build/logs/clover.xml
Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/php_cs_fixer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,12 @@ jobs:
token: ${{ secrets.PHP_CS_FIXER }}
ref: ${{ github.head_ref }}

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none # disable xdebug, pcov

- name: Cache Composer Dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install Composer Dependencies
run: composer install --no-progress
- uses: "ramsey/composer-install@v2"

- name: Run php-cs-fixer
run: vendor/bin/php-cs-fixer fix --diff
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/phpstan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,11 @@ jobs:
steps:
- uses: actions/checkout@v3

- id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none

- run: composer install --no-progress
- uses: "ramsey/composer-install@v2"

- run: vendor/bin/phpstan analyse --ansi
16 changes: 3 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,12 @@ jobs:
php-version: '7.4'
coverage: none

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache Composer Dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install Box global
run: composer global require "humbug/box:^3.8" --no-ansi --no-interaction --no-progress --classmap-authoritative

- name: Install Composer Dependencies
run: composer install --no-ansi --no-interaction --no-dev --no-progress --classmap-authoritative
- uses: "ramsey/composer-install@v2"
with:
composer-options: "--no-ansi --no-interaction --no-dev --classmap-authoritative"

- name: Compile Phar with Box
run: box compile
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,13 @@ jobs:
steps:
- uses: actions/checkout@v3

- id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none # disable xdebug, pcov

- run: composer update --no-interaction --no-suggest --no-progress
- uses: "ramsey/composer-install@v2"
with:
composer-options: "--no-interaction --no-suggest"

- run: vendor/bin/phpunit
3 changes: 3 additions & 0 deletions Resources/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use TYPO3\Surf\Cli\Symfony\ConsoleApplication;
use TYPO3\Surf\Cli\Symfony\ConsoleOutputFactory;
Expand Down Expand Up @@ -79,4 +81,5 @@
$services->alias(FactoryInterface::class, Factory::class);

$services->alias(VersionCheckerInterface::class, ComposerVersionChecker::class);
$services->alias(ContainerInterface::class, Container::class);
};

0 comments on commit 06295f1

Please sign in to comment.