Use ramsey/composer-install to handle composer install & cache

This commit is contained in:
Jeremy Benoist 2020-12-03 10:16:03 +01:00
parent 92b14a3536
commit 189a9ef033
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
3 changed files with 9 additions and 36 deletions

View file

@ -28,19 +28,10 @@ jobs:
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php }}-composer-locked-"
- name: "Install dependencies with Composer"
run: "composer install --no-interaction --optimize-autoloader --no-progress --prefer-dist"
uses: "ramsey/composer-install@v1"
with:
composer-options: "--optimize-autoloader --prefer-dist"
- name: "Run PHP CS Fixer"
run: "bin/php-cs-fixer fix --verbose --dry-run --format=checkstyle | cs2pr"

View file

@ -67,19 +67,10 @@ jobs:
createdb -h localhost -p 5432 -U wallabag wallabag_test
pg_isready -d wallabag_test -h localhost -p 5432 -U wallabag
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php }}-composer-locked-"
- name: "Install dependencies with composer"
run: "composer install --no-interaction --optimize-autoloader --no-progress --prefer-dist"
composer-options: "--optimize-autoloader --prefer-dist"
- name: "Prepare database"
run: "make prepare DB=${{ matrix.database }}"

View file

@ -33,19 +33,10 @@ jobs:
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php }}-composer-locked-"
- name: "Install dependencies with Composer"
run: "composer install --no-interaction --optimize-autoloader --no-progress --prefer-dist"
uses: "ramsey/composer-install@v1"
with:
composer-options: "--optimize-autoloader --prefer-dist"
- name: "Validate Core translations"
run: "php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v"