fix: fix derp π€¦π½ββοΈ #5
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: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
name: Test on PHP ${{ matrix.php-versions }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: ['8.1', '8.2', '8.3'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: none | |
- name: Install composer and dependencies | |
uses: php-actions/composer@v6 | |
- name: PHPUnit Tests | |
uses: php-actions/phpunit@v3 | |
env: | |
XDEBUG_MODE: coverage | |
with: | |
bootstrap: vendor/autoload.php | |
configuration: phpunit.xml | |
php_extensions: xdebug | |
args: --log-junit junit.xml | |
- name: Upload test results to Codecov | |
if: ${{ !cancelled() }} | |
uses: codecov/test-results-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
phpstan: | |
name: PHPStan | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: ['8.1', '8.2', '8.3'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: none | |
- name: Install Composer Dependencies | |
uses: ramsey/composer-install@v2 | |
- name: Run phpstan | |
run: vendor/bin/phpstan analyse -c phpstan.neon --xdebug --no-progress | |
cscheck: | |
name: Code Sniffer check | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: ['8.1', '8.2', '8.3'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: none | |
- name: Install Composer Dependencies | |
uses: ramsey/composer-install@v2 | |
- name: Run Code Sniffer | |
run: vendor/bin/phpcs |