Skip to content

Commit

Permalink
Fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Feb 19, 2021
1 parent 7b4c762 commit e2f8bd1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/test-application.yaml
Expand Up @@ -77,8 +77,8 @@ jobs:
run: composer bootstrap-test-environment

- name: Execute test
if: ${{ matrix.coverage }} != false
run: composer test-with-coverage
if: matrix.coverage == false
run: composer test

- name: Execute test with coverage
if: ${{ matrix.coverage }}
Expand All @@ -88,14 +88,20 @@ jobs:
if: ${{ matrix.lint }}
run: composer lint

- name: Coverage all upload
- name: Install Coverage all
if: ${{ matrix.coverage }}
run: |
curl -L https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar --output php-coveralls.phar
composer require --dev php-coveralls/php-coveralls
export COVERALLS_REPO_TOKEN=Oa0R2jn3DOKzycfdtvhZKBxgFcRufVPFo
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar
chmod +x php-coveralls.phar
apt-get update && apt-get install git -y
php php-coveralls.phar --coverage_clover Tests/reports/clover.xml --json_path Tests/reports/coveralls.json
continue-on-error: true
./php-coveralls.phar --version
- name: Coverage all upload
if: ${{ matrix.coverage }}
run: ./php-coveralls.phar --coverage_clover Tests/reports/clover.xml --json_path Tests/reports/coveralls.json
env:
COVERALLS_REPO_TOKEN: Oa0R2jn3DOKzycfdtvhZKBxgFcRufVPFo

- name: Check coverage
if: ${{ matrix.coverage }}
Expand Down
2 changes: 2 additions & 0 deletions composer.json
Expand Up @@ -36,6 +36,7 @@
},
"require-dev": {
"coduo/php-matcher": "^3.2 || ^4.0 || ^5.0 || ^6.0",
"doctrine/data-fixtures": "^1.3.3",
"doctrine/doctrine-fixtures-bundle": "^2.0 || ^3.0",
"friendsofphp/php-cs-fixer": "^2.17",
"handcraftedinthealps/code-coverage-checker": "^0.2.1",
Expand All @@ -44,6 +45,7 @@
"jangregor/phpstan-prophecy": "^0.8",
"matthiasnoback/symfony-config-test": "^4.0",
"matthiasnoback/symfony-dependency-injection-test": "^4.0",
"php-coveralls/php-coveralls": "^2.4",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-doctrine": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
Expand Down

0 comments on commit e2f8bd1

Please sign in to comment.