Skip to content

Commit

Permalink
Cache composer dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
DevDavido committed Jan 20, 2021
1 parent 12db545 commit b398a1f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ jobs:
php-version: ${{ matrix.php }}
coverage: xdebug

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

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

- name: Install dependencies
run: composer update --${{ matrix.dependency-version }} --prefer-source --no-interaction

Expand Down

0 comments on commit b398a1f

Please # to comment.