Skip to content

Commit

Permalink
test sf 4.4, 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
karser committed Dec 3, 2020
1 parent 13986e9 commit 8667fda
Showing 1 changed file with 45 additions and 6 deletions.
51 changes: 45 additions & 6 deletions .github/workflows/code_checks.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
name: Code_Checks

on:
pull_request: null
push:
branches:
- master
pull_request:
schedule:
- cron: '0 0 1,16 * *'

jobs:
tests:
phpunit:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.2', '7.4', '8.0']

name: PHP ${{ matrix.php }} tests
symfony: ['4.4.*', '5.2.*']
fail-fast: false
name: PHPUnit (PHP ${{ matrix.php }}) (Symfony ${{ matrix.symfony }})
steps:
# basically git clone
- uses: actions/checkout@v2
Expand All @@ -25,5 +28,41 @@ jobs:
coverage: none # disable xdebug, pcov

# if we 2 steps like this, we can better see if composer failed or tests
- run: composer install --no-progress
- run: vendor/bin/phpunit
- name: Install dependencies
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
run: |
composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-main
composer update --prefer-dist --no-interaction --no-suggest
- name: Run tests
run: vendor/bin/phpunit

code-coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: xdebug

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: coverage-${{ hashFiles('composer.json') }}

- name: Install dependencies
run: |
composer update --prefer-dist --no-interaction --no-suggest
- name: Run code coverage
run: vendor/bin/phpunit -v --coverage-text --coverage-clover=coverage.clover

- name: Send code coverage
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover

0 comments on commit 8667fda

Please sign in to comment.