Use vendors caching correctly
This commit is contained in:
parent
2b259e9f2b
commit
bb8065ade1
16
.github/workflows/php.yml
vendored
16
.github/workflows/php.yml
vendored
@ -7,7 +7,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
max-parallel: 15
|
max-parallel: 15
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
# TODO : enable tests on windows
|
||||||
|
operating-system: [ubuntu-latest, macOS-latest]
|
||||||
php-versions: ['7.1', '7.2', '7.3']
|
php-versions: ['7.1', '7.2', '7.3']
|
||||||
|
|
||||||
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
|
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
|
||||||
@ -23,18 +24,19 @@ jobs:
|
|||||||
extension-csv: mbstring, xdebug
|
extension-csv: mbstring, xdebug
|
||||||
coverage: xdebug
|
coverage: xdebug
|
||||||
|
|
||||||
|
- name: Get Composer Cache Directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Validate composer.json and composer.lock
|
- name: Validate composer.json and composer.lock
|
||||||
run: composer validate
|
run: composer validate
|
||||||
|
|
||||||
- name: Cache vendor
|
- name: Cache vendor
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
path: node_modules
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
key: ${{ runner.OS }}-build-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: |
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
${{ runner.OS }}-build-${{ matrix.php-versions }}-${{ env.cache-name }}-
|
|
||||||
${{ runner.OS }}-build-${{ matrix.php-versions }}-
|
|
||||||
${{ runner.OS }}-build-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: composer install --prefer-dist --no-progress --no-suggest
|
run: composer install --prefer-dist --no-progress --no-suggest
|
||||||
|
Loading…
Reference in New Issue
Block a user