From 0d9551cbe8ac4e0f03211df4f49ef793f22e7747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Fri, 21 Jan 2022 09:51:14 +0100 Subject: [PATCH] ci: switch to ramsey/composer-install (#111) --- .github/workflows/tests.yml | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f875b2e..6884707 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,15 +7,18 @@ jobs: runs-on: ubuntu-latest strategy: matrix: + php-version: + - "7.1" + - "7.2" + - "7.3" + - "7.4" + - "8.0" + - "8.1" + dependencies: + - highest include: - - php-version: "7.1" - - php-version: "7.2" - - php-version: "7.3" - - php-version: "7.4" - - php-version: "8.0" - php-version: "8.1" - - php-version: "8.1" - prefer: lowest + dependencies: lowest steps: - name: Start MySQL @@ -41,24 +44,10 @@ jobs: php-version: ${{ matrix.php-version }} extensions: mbstring, xml, ctype, iconv, intl, pdo_mysql, pdo_pgsql - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache dependencies - uses: actions/cache@v2 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.prefer }}- - restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}- - - name: Install dependencies - if: ${{ matrix.prefer != 'lowest' }} - run: composer update --prefer-dist --no-interaction --no-progress - - - name: Install lowest dependencies - if: ${{ matrix.prefer == 'lowest' }} - run: composer update --prefer-lowest --prefer-dist --no-interaction --no-progress + uses: "ramsey/composer-install@v2" + with: + dependency-versions: "${{ matrix.dependencies }}" - name: Install PHPUnit run: php vendor/bin/simple-phpunit install