[Snyk] Upgrade event-source-polyfill from 1.0.24 to 1.0.31 #74
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: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-test: | |
# https://hub.docker.com/_/ubuntu/ | |
runs-on: ubuntu-latest | |
steps: | |
# https://github.com/actions/checkout (official) | |
- name: Checkout | |
uses: actions/checkout@v2.3.3 | |
# https://github.com/shivammathur/setup-php (community) | |
- name: Setup PHP, extensions and composer with shivammathur/setup-php | |
uses: shivammathur/setup-php@2.7.0 | |
with: | |
php-version: 8.0 | |
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, dom, filter, gd, json, bcmath, zip | |
# Composer | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
# https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows | |
- name: Cache composer dependencies | |
uses: actions/cache@v1 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install Composer dependencies | |
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader | |
# https://github.com/sensiolabs/security-checker | |
- name: Security check installed dependencies | |
uses: symfonycorp/security-checker-action@v2 | |
- name: Check PSR12 code style (PHP_CodeSniffer) | |
run: vendor/bin/phpcs src | |
# https://github.com/phpstan/phpstan | |
- name: Analyse PHP Code (PHPStan) | |
run: vendor/bin/phpstan analyse src | |
# Symfony | |
- name: Check the Symfony console | |
run: | | |
php bin/console -V | |
php bin/console about | |
# Tests | |
- name: Run unit and functional tests | |
run: | | |
XDEBUG_MODE=coverage php bin/phpunit --coverage-clover clover.xml --stop-on-failure | |
- name: Generate test coverage badge | |
uses: timkrase/phpunit-coverage-badge@v1.2.0 | |
with: | |
coverage_badge_path: 'badge-coverage.svg' | |
push_badge: true | |
repo_token: ${{ secrets.GITHUB_TOKEN }} |