Skip to content

Commit

Permalink
Fixed composer cache dir + removed special cases for PHP 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ezimuel committed Apr 12, 2024
1 parent a2a3ded commit 9c56203
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,25 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: yaml
extensions: yaml, zip, curl
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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

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

- name: Install dependencies
if: ${{ matrix.php-version != '8.0' }}
run: |
composer install --prefer-dist
- name: ignore ignore-platform-reqs if it is using php 8
if: ${{ matrix.php-version == '8.0' }}
run: |
composer install --prefer-dist --ignore-platform-reqs
- name: PHP Coding Standards
run: |
composer run-script phpcs
Expand Down

0 comments on commit 9c56203

Please sign in to comment.