chore(deps): update dependencies #43
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: Check CS | |
on: | |
push: | |
pull_request_target: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Check code style | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 10 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
php-version: "7.4" | |
tools: cs2pr | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache dependencies installed with composer | |
uses: actions/cache@v1 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }} | |
restore-keys: php-${{ matrix.php-version }}-composer-locked- | |
- name: Install dependencies with composer | |
run: composer update --no-interaction --no-progress --no-suggest | |
- if: ${{ github.base_ref == '' }} | |
run: composer cscheck | |
- name: Install git-phpcs | |
if: ${{ github.base_ref != '' }} | |
run: wget https://github.com/diff-sniffer/diff-sniffer/releases/download/0.5.1/diff-sniffer.phar | |
- name: Fetch head branch | |
if: ${{ github.base_ref != '' }} | |
run: git remote set-branches --add origin $GITHUB_BASE_REF && git fetch origin $GITHUB_BASE_REF | |
- name: Run diff-sniffer | |
if: ${{ github.base_ref != '' }} | |
run: php diff-sniffer.phar origin/$GITHUB_BASE_REF...$GITHUB_SHA --report=checkstyle --standard=Solido src/ | cs2pr |