Skip to content

Commit

Permalink
testing codeclimate integration without local env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
bapcltd-marv committed May 27, 2021
1 parent 64b6018 commit 80bbbdf
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,48 @@ jobs:

- name: Run tests
run: ./vendor/bin/phpunit --testdox --stop-on-failure

coverage:
name: Coverage
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-20.04']
php-versions: ['8.0']

steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug

- uses: actions/checkout@v2

- name: Validate composer.json and composer.lock
run: composer validate

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache Files
uses: actions/cache@v2
with:
path: |
${{ steps.composer-cache.outputs.dir }}
**/.php_cs.cache
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run tests
uses: paambaati/codeclimate-action@v2.2.4
env:
CC_TEST_REPORTER_ID: ${{ env.CC_TEST_REPORTER_ID || "945dfb58a832d233a3caeb84e3e6d3be212e8c7abcb48117fce63b9adcb43647" }}
with:
coverageCommand: ./vendor/bin/phpunit --testdox --stop-on-failure --coverage-clover=clover.xml

0 comments on commit 80bbbdf

Please sign in to comment.