From 4e9dc62ee4335aca059431fcdb648d02722aa297 Mon Sep 17 00:00:00 2001 From: Justin Frydman Date: Thu, 10 Aug 2023 11:44:03 -0600 Subject: [PATCH] Bump checkout action, use composer-install action --- .github/workflows/ci.yml | 15 +++++---------- .github/workflows/release.yml | 11 +++++++---- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec2c519..1903ae7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,20 +10,13 @@ jobs: matrix: os: [ubuntu-latest] php: ['7.3', '7.4', '8.0', '8.1'] - dependency-version: [prefer-stable] name: CI - PHP ${{ matrix.php }} steps: - name: Checkout - uses: actions/checkout@v2 - - - name: Cache dependencies - uses: actions/cache@v1 - with: - path: ~/.composer/cache/files - key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + uses: actions/checkout@v3 - name: Set up PHP uses: shivammathur/setup-php@v2 @@ -33,9 +26,11 @@ jobs: coverage: pcov - name: Install Composer dependencies - run: composer update --prefer-stable --no-interaction --prefer-dist --no-suggest + uses: ramsey/composer-install@v2 + with: + composer-options: "--prefer-stable --prefer-dist" - # Github workflows/actions have no tty, the script command captures the output as a work around + # GitHub workflows/actions have no tty, the script command captures the output as a work around - name: PHPUnit Testing run: php vendor/bin/phpunit -c ./phpunit.xml.dist diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b0196ca..ae903b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Set up PHP - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@v3 with: # Currently, phars built with 8.1 still work on 7.3+ php-version: '8.1' @@ -27,9 +27,12 @@ jobs: uses: actions/checkout@v2 - name: Install optimized composer dependencies - run: | - composer install --no-progress --no-suggest --classmap-authoritative - composer dump-autoload --no-dev --classmap-authoritative + uses: ramsey/composer-install@v2 + with: + composer-options: "--classmap-authoritative" + + - name: Generate dev-free composer autoloader + run: composer dump-autoload --no-dev --classmap-authoritative - name: Build phar run: php so app:build ${{ env.PHAR_NAME }} --build-version=${{ github.ref_name }}