Skip to content

CI : phpcs is disabled for now, php8.4 not ready yet #27

CI : phpcs is disabled for now, php8.4 not ready yet

CI : phpcs is disabled for now, php8.4 not ready yet #27

Workflow file for this run

# Inspired by Sebastian Bergmann's phpunit action workflow https://github.com/sebastianbergmann/phpunit/blob/main/.github/workflows/ci.yaml
name: "CI"
on:
- pull_request
- push
jobs:
dependency-validation:
name: Dependency Validation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
extensions: mbstring
coverage: none
tools: none
- name: Ensure that composer.json is valid
run: composer validate --no-ansi --strict composer.json
- name: Ensure that dependencies can be installed
run: composer install --no-ansi --dry-run
coding-guidelines:
name: Coding Guidelines
needs:
- dependency-validation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
extensions: mbstring
coverage: none
tools: none
- name: Install dependencies with Composer
run: composer install --no-ansi
# phpcs is not php8.4 compatible for now.
# - name: Run PHP-CS-Fixer
# run: vendor/bin/phpcs src
static-analysis:
name: Static analysis
needs:
- dependency-validation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
extensions: mbstring
coverage: none
tools: none
- name: Install dependencies with Composer
run: composer install --no-interaction --no-ansi --no-progress
- name: PHPStan analysis
run: vendor/bin/phpstan analyze src --level=5
unit-tests:
name: Unit tests
needs:
- dependency-validation
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- "8.4"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring
tools: none
coverage: xdebug
- name: Install dependencies with Composer
run: composer install --no-ansi --no-interaction --no-progress
- name: Run tests with PHPUnit
run: vendor/bin/phpunit --coverage-clover coverage-${{ matrix.php-version }}.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
files: coverage-*.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}