diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b1a811..9b23857 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,27 +3,39 @@ name: CI on: push: pull_request: - schedule: - - cron: '5 5 * * *' jobs: testsuite: name: all tests runs-on: ubuntu-latest steps: - - name: "Checkout" + - name: Checkout uses: actions/checkout@v4 - - name: "Install PHP" + + - name: Install PHP uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php }}" coverage: none tools: composer:v2 - - name: "Composer Install" - run: "composer install" - - name: "Run Static Code Analysis" - run: "composer ci:static" + + - name: Get composer cache directory + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - name: Cache dependencies + uses: actions/cache@v4 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install dependencies + run: composer install + + - name: Run static code analysis + run: composer ci:static strategy: fail-fast: false matrix: - php: [ '7.4', '8.0', '8.1', '8.2' ] + php: [ '8.2', '8.3' ]