Skip to content

Fix submenu: restore Overview page, fix collapse nesting, hide rail #66

Fix submenu: restore Overview page, fix collapse nesting, hide rail

Fix submenu: restore Overview page, fix collapse nesting, hide rail #66

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
name: PHPCS Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
tools: composer
coverage: none
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: Run PHPCS
run: composer run phpcs
test:
name: PHPUnit Tests (PHP ${{ matrix.php-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php-version: '7.4'
coverage: none
- php-version: '8.2'
coverage: none
- php-version: '8.4'
coverage: xdebug
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer
coverage: ${{ matrix.coverage }}
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: Run tests
if: matrix.coverage == 'none'
run: composer run test
- name: Run tests with coverage
if: matrix.coverage != 'none'
run: vendor/bin/phpunit --coverage-clover coverage.xml --coverage-text
- name: Check coverage threshold
if: matrix.coverage != 'none'
env:
MIN_COVERAGE: '75.0'
run: |
COVERAGE=$(php -r "\$xml = simplexml_load_file('coverage.xml'); \$metrics = \$xml->project->metrics; \$pct = round(((int)\$metrics['coveredstatements'] / max((int)\$metrics['statements'], 1)) * 100, 1); echo \$pct;")
echo "Coverage: ${COVERAGE}%"
if (( $(echo "$COVERAGE < $MIN_COVERAGE" | bc -l) )); then
echo "::error::Coverage ${COVERAGE}% is below the ${MIN_COVERAGE}% threshold"
exit 1
fi