chore(deps): update actions/cache action to v4 (#52) #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PHP Client | |
on: | |
push: | |
branches: [main] | |
paths: | |
- .github/workflows/php-client.yml | |
- php-client/** | |
pull_request: | |
branches: [main] | |
paths: | |
- .github/workflows/php-client.yml | |
- php-client/** | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: | |
- "7.4" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.php-version }}-composer- | |
- name: Install | |
working-directory: php-client | |
run: | | |
composer install | |
- name: Test | |
working-directory: php-client | |
run: | | |
composer exec phpunit |