Skip to content

Commit

Permalink
separate job for uploading coverage report;
Browse files Browse the repository at this point in the history
  • Loading branch information
hans-thomas committed Oct 23, 2023
1 parent ec4a2a0 commit a7ec8ba
Showing 1 changed file with 31 additions and 13 deletions.
44 changes: 31 additions & 13 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: xdebug
ini-values: xdebug.mode="coverage"
coverage: xdebug

- name: Validate composer.json and composer.lock
run: composer validate --strict
Expand All @@ -45,16 +42,37 @@ jobs:
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Install dependencies
run: composer install --prefer-dist --no-progress
run: composer install --prefer-dist --no-interaction --no-suggest

- name: Run test suite
run: composer run-script test:coverage
run: composer run-script test

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: starter-codecov
fail_ci_if_error: true
upload-coverage:

runs-on: ubuntu-latest
needs: build

steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: xdebug
ini-values: xdebug.mode="coverage"
coverage: xdebug

- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-suggest

- name: Run test suite
run: composer run-script test:coverage

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
name: lyra-codecov
fail_ci_if_error: true

0 comments on commit a7ec8ba

Please sign in to comment.