Remove device source file #7
This file contains hidden or 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: "CI" | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| PHP_STABLE_VERSION: '8.4' | |
| jobs: | |
| cs: | |
| name: "Code style" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Git: checkout" | |
| uses: actions/checkout@v4 | |
| - name: "PHP: setup ${{ env.PHP_STABLE_VERSION }}" | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ env.PHP_STABLE_VERSION }} | |
| coverage: none | |
| tools: php-cs-fixer | |
| - name: "Composer: validate" | |
| run: composer validate --strict | |
| - name: "Composer: install" | |
| run: composer install --prefer-dist --no-interaction --no-progress | |
| - name: "Php-CS-Fixer: version" | |
| run: php-cs-fixer -V | |
| - name: "Php-CS-Fixer: check" | |
| run: php-cs-fixer fix --diff --dry-run | |
| sa: | |
| name: "Static Analysis" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Git: checkout" | |
| uses: actions/checkout@v4 | |
| - name: "PHP: setup ${{ env.PHP_STABLE_VERSION }}" | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ env.PHP_STABLE_VERSION }} | |
| coverage: pcov | |
| tools: phpstan | |
| - name: "Composer: install" | |
| run: composer install --prefer-dist --no-interaction --no-progress | |
| - name: "PHPStan: version" | |
| run: phpstan --version | |
| - name: "PHPStan: analyze" | |
| run: phpstan analyze --memory-limit=-1 | |
| unit-tests: | |
| name: "Unit Tests (PHP ${{ matrix.php-version }})" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php-version: ['8.2', '8.3', '8.4', '8.5'] | |
| fail-fast: false | |
| steps: | |
| - name: "Git: checkout" | |
| uses: actions/checkout@v4 | |
| - name: "PHP: setup ${{ matrix.php-version }}" | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| coverage: pcov | |
| tools: phpunit | |
| # Force PHPUnit 11.5 on PHP 8.2 to keep support for it | |
| # https://phpunit.de/supported-versions.html | |
| - if: matrix.php-version == '8.2' | |
| run: composer require --no-update phpunit/phpunit:^11.5 | |
| - name: "Composer: install" | |
| run: composer update --no-interaction --prefer-dist | |
| - name: "PHPUnit: version" | |
| run: phpunit --version | |
| - name: "PHPUnit: unit tests" | |
| if: matrix.php-version != env.PHP_STABLE_VERSION | |
| run: phpunit | |
| - name: "PHPUnit: all tests + coverage" | |
| if: matrix.php-version == env.PHP_STABLE_VERSION | |
| run: phpunit --coverage-clover ./coverage.xml | |
| - name: "Codecov: upload coverage" | |
| if: matrix.php-version == env.PHP_STABLE_VERSION | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage.xml | |
| fail_ci_if_error: false |