Skip to content

Commit 0d9551c

Browse files
authored
ci: switch to ramsey/composer-install (#111)
1 parent ac9b31b commit 0d9551c

File tree

1 file changed

+13
-24
lines changed

1 file changed

+13
-24
lines changed

.github/workflows/tests.yml

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10+
php-version:
11+
- "7.1"
12+
- "7.2"
13+
- "7.3"
14+
- "7.4"
15+
- "8.0"
16+
- "8.1"
17+
dependencies:
18+
- highest
1019
include:
11-
- php-version: "7.1"
12-
- php-version: "7.2"
13-
- php-version: "7.3"
14-
- php-version: "7.4"
15-
- php-version: "8.0"
1620
- php-version: "8.1"
17-
- php-version: "8.1"
18-
prefer: lowest
21+
dependencies: lowest
1922

2023
steps:
2124
- name: Start MySQL
@@ -41,24 +44,10 @@ jobs:
4144
php-version: ${{ matrix.php-version }}
4245
extensions: mbstring, xml, ctype, iconv, intl, pdo_mysql, pdo_pgsql
4346

44-
- name: Get composer cache directory
45-
id: composer-cache
46-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
47-
48-
- name: Cache dependencies
49-
uses: actions/cache@v2
50-
with:
51-
path: ${{ steps.composer-cache.outputs.dir }}
52-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.prefer }}-
53-
restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}-
54-
5547
- name: Install dependencies
56-
if: ${{ matrix.prefer != 'lowest' }}
57-
run: composer update --prefer-dist --no-interaction --no-progress
58-
59-
- name: Install lowest dependencies
60-
if: ${{ matrix.prefer == 'lowest' }}
61-
run: composer update --prefer-lowest --prefer-dist --no-interaction --no-progress
48+
uses: "ramsey/composer-install@v2"
49+
with:
50+
dependency-versions: "${{ matrix.dependencies }}"
6251

6352
- name: Install PHPUnit
6453
run: php vendor/bin/simple-phpunit install

0 commit comments

Comments
 (0)