From 7e1ff3b04162fd70ea11c00fd2695f6ce0f44053 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Wed, 31 Jan 2024 14:10:20 -0500 Subject: [PATCH] refactor: Clean up & modernize run steps --- .github/workflows/code-analysis.yaml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/code-analysis.yaml b/.github/workflows/code-analysis.yaml index ce51408..577103a 100644 --- a/.github/workflows/code-analysis.yaml +++ b/.github/workflows/code-analysis.yaml @@ -14,21 +14,22 @@ jobs: fail-fast: false matrix: actions: - - - name: 'PHPStan' + - name: 'PHPStan' run: composer phpstan - - - name: 'Coding Standards' + - name: 'Coding Standards' run: composer fix-cs name: ${{ matrix.actions.name }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - # see https://github.com/shivammathur/setup-php - - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - coverage: none - # composer install cache - https://github.com/ramsey/composer-install - - uses: "ramsey/composer-install@v2" - - run: ${{ matrix.actions.run }} + - uses: actions/checkout@v4 + - name: Cache Composer dependencies + uses: actions/cache@v4 + with: + path: /tmp/composer-cache + key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} + - uses: php-actions/composer@v6 + with: + php_version: 8.2 + # Additional php_extensions are only needed if Craft itself will be run in CI (tests, etc) + #php_extensions: ctype curl dom iconv imagick intl json mbstring openssl pcre pdo reflection spl zip + - run: ${{ matrix.actions.run }}