Bump phpstan/phpstan from 1.8.2 to 1.10.29 #317
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PHP CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2.3.4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@2.12.0 | |
with: | |
php-version: 8.1 | |
coverage: pcov | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
- name: Cache Composer packages | |
uses: actions/cache@v2.1.6 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress --no-interaction | |
- name: Run test suite | |
run: vendor/bin/phpunit --coverage-clover ./clover.xml --log-junit ./junit.xml | |
- name: Save clover.xml | |
uses: actions/upload-artifact@v2 | |
with: | |
name: clover.xml | |
path: clover.xml | |
retention-days: 1 | |
- name: Save junit.xml | |
uses: actions/upload-artifact@v2 | |
with: | |
name: junit.xml | |
path: junit.xml | |
retention-days: 1 | |
psalm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2.3.4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@2.12.0 | |
with: | |
php-version: 8.1 | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache Composer packages | |
uses: actions/cache@v2.1.6 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress --no-interaction | |
- name: Run phpstan | |
run: ./vendor/bin/phpstan analyse --memory-limit=-1 -c phpstan.neon | |
sonarcloud: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v2.3.4 | |
with: | |
fetch-depth: 0 | |
- name: Download clover.xml | |
uses: actions/download-artifact@v2 | |
with: | |
name: clover.xml | |
- name: Download junit.xml | |
uses: actions/download-artifact@v2 | |
with: | |
name: junit.xml | |
- name: Fix paths | |
run: sed -i "s@$(pwd)@/github/workspace@g" junit.xml clover.xml | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |