Bump symfony/process from 5.2.3 to 5.4.46 #52
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: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build-artifact: | |
name: Checkout and store | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: source-code | |
path: | | |
. | |
!.github/ | |
!.idea/ | |
composer-validate: | |
name: Validate composer files | |
runs-on: ubuntu-latest | |
needs: build-artifact | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: source-code | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
phpunit: | |
name: Run PHPUnit | |
runs-on: ubuntu-latest | |
needs: composer-validate | |
strategy: | |
matrix: | |
php-versions: [7.4, 8.0] | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: source-code | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
- name: Get Composer cache directory | |
id: composer-cache-dir | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Ensure usage of cached dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress | |
- name: Run tests | |
run: composer run-script test | |
- uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: .phpunit.cache/code-coverage/clover.xml | |
flags: unittests | |
rector: | |
name: Run Rector | |
runs-on: ubuntu-latest | |
needs: composer-validate | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: source-code | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
coverage: none | |
tools: cs2pr | |
- name: Get Composer cache directory | |
id: composer-cache-dir | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Ensure usage of cached dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress | |
- name: Run Rector and comment any issues on PR | |
run: vendor/bin/rector process --ansi --dry-run --output-format=checkstyle | cs2pr | |
psalm: | |
name: Run Psalm | |
runs-on: ubuntu-latest | |
needs: composer-validate | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: source-code | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
- name: Get Composer cache directory | |
id: composer-cache-dir | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Ensure usage of cached dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress | |
- name: Run Psalm and generate a type coverage badge in Shepherd | |
run: vendor/bin/psalm --shepherd |