Skip to content

Commit

Permalink
ci: refine
Browse files Browse the repository at this point in the history
  • Loading branch information
blue32a committed Jul 3, 2023
1 parent 628a015 commit 08fd7f1
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
php-version: ${{ matrix.php-version }}

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Using Composer version 2
run: sudo composer self-update --2
Expand All @@ -29,14 +29,13 @@ jobs:

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache Composer Directory
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}
restore-keys: php-${{ matrix.php-version }}-composer
restore-keys: php-${{ matrix.php-version }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
Expand All @@ -52,21 +51,20 @@ jobs:
php-version: '8.2'

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Using Composer version 2
run: sudo composer self-update --2

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache Composer Directory
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: php-8.2-composer-${{ hashFiles('composer.lock') }}
restore-keys: php-8.2-composer
key: php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}
restore-keys: php-${{ matrix.php-version }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
Expand Down

0 comments on commit 08fd7f1

Please sign in to comment.