Try caching composer stuff
Especially the GCM stuff may be quite large, so caching may be a good idea. I tried following https://github.com/shivammathur/setup-php#cache-composer-dependencies
This commit is contained in:
parent
fba8384ac3
commit
3ba6483bf3
1 changed files with 23 additions and 0 deletions
23
.github/workflows/tests.yml
vendored
23
.github/workflows/tests.yml
vendored
|
@ -20,17 +20,40 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: gd, sqlite3
|
extensions: gd, sqlite3
|
||||||
|
|
||||||
|
# composer cache
|
||||||
- name: Remove composer lock
|
- name: Remove composer lock
|
||||||
run: rm composer.lock
|
run: rm composer.lock
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
# http://man7.org/linux/man-pages/man1/date.1.html
|
||||||
|
# https://github.com/actions/cache#creating-a-cache-key
|
||||||
|
- name: Get Date
|
||||||
|
id: get-date
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
|
||||||
|
shell: bash
|
||||||
|
- name: Cache dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ steps.get-date.outputs.date }}-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
# composer
|
||||||
- name: Setup PHPunit
|
- name: Setup PHPunit
|
||||||
run: composer install -n
|
run: composer install -n
|
||||||
- name: Install Google Cloud Storage
|
- name: Install Google Cloud Storage
|
||||||
run: composer require google/cloud-storage
|
run: composer require google/cloud-storage
|
||||||
|
|
||||||
|
# testing
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: ../vendor/bin/phpunit --no-coverage
|
run: ../vendor/bin/phpunit --no-coverage
|
||||||
working-directory: tst
|
working-directory: tst
|
||||||
|
|
Loading…
Reference in a new issue