Fixed coverage for shell sctipt command. #182
Workflow file for this run
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: Test PHP | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
- 'feature/**' | |
jobs: | |
test-php: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-versions: ['8.2', '8.3'] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache Composer dependencies | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/composer-cache | |
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: pcov | |
ini-values: pcov.directory=. | |
- name: Install dependencies | |
run: composer install | |
- name: Check coding standards | |
run: composer lint | |
continue-on-error: ${{ vars.CI_LINT_IGNORE_FAILURE == '1' }} | |
- name: Run tests | |
run: composer test-coverage | |
continue-on-error: ${{ vars.CI_TEST_IGNORE_FAILURE == '1' }} | |
- name: Upload coverage report as an artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{github.job}}-code-coverage-report-${{ matrix.php-versions }} | |
path: ./.coverage-html | |
if-no-files-found: error | |
- name: Upload coverage report to Codecov | |
uses: codecov/codecov-action@v4 | |
if: ${{ env.CODECOV_TOKEN != '' }} | |
with: | |
files: ./cobertura.xml | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
# yamllint disable-line #;< PHP_PHAR | |
build-php: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache Composer dependencies | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/composer-cache | |
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
- name: Install dependencies | |
run: composer install | |
- name: Build PHAR | |
run: composer build | |
- name: Test PHAR | |
run: ./.build/php-command.phar || exit 1 | |
# yamllint disable-line #;> PHP_PHAR |