diff --git a/.github/workflows/static-analysis.yaml b/.github/workflows/static-analysis.yaml index 90eca10..bc691b6 100644 --- a/.github/workflows/static-analysis.yaml +++ b/.github/workflows/static-analysis.yaml @@ -26,19 +26,8 @@ jobs: php-version: 7.4 tools: phpstan, cs2pr - - name: Get Composer cache directory - id: composercache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache Composer dependencies - uses: actions/cache@v2 - with: - path: ${{ steps.composercache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install Composer dependencies - run: composer install --no-progress --prefer-dist --optimize-autoloader + uses: ramsey/composer-install@v2 - name: Cache PHPStan uses: actions/cache@v2 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index fb7f713..92dbdfe 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -17,9 +17,9 @@ jobs: strategy: fail-fast: false matrix: - php-version: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0'] + php-version: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] include: - - php-version: '7.4' + - php-version: '8.0' coverage: true steps: @@ -36,22 +36,11 @@ jobs: - name: Install Pandoc run: sudo apt install pandoc - - name: Determine Composer cache directory - id: composercache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Load Composer cache - uses: actions/cache@v2 - with: - path: ${{ steps.composercache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install Composer dependencies - run: composer install --no-progress --prefer-dist --optimize-autoloader + uses: ramsey/composer-install@v2 - name: Run PHPUnit - run: vendor/bin/phpunit --testdox ${{ !matrix.coverage && '--no-coverage' || '' }} + run: vendor/bin/phpunit --testdox ${{ matrix.coverage && '--coverage-clover ./coverage.xml' || '--no-coverage' }} - name: Upload coverage to Codecov uses: codecov/codecov-action@v1