Fix GitHub Action. #1
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: Test | |
on: | |
- push | |
- pull_request | |
jobs: | |
yml-lint: | |
runs-on: ubuntu-latest | |
name: 'YML lint' | |
timeout-minutes: 3 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: docker pull cytopia/yamllint | |
- run: docker run --rm -t -v $(pwd):/data cytopia/yamllint --config-file=tests/.yamllint . | |
markdown-lint: | |
runs-on: ubuntu-latest | |
name: 'Markdown lint' | |
timeout-minutes: 3 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: docker pull tmknom/markdownlint | |
- run: docker run --rm -v $(pwd):/work tmknom/markdownlint '**/*.md' --config tests/.markdownlintrc --ignore vendor --ignore CHANGELOG.md --ignore var --ignore tmp | |
cs-lint: | |
runs-on: ubuntu-latest | |
name: 'CS Lint' | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.4' | |
tools: composer:v2 | |
- run: composer install --dev --ignore-platform-req=php --quiet | |
shell: bash | |
- run: PHP_CS_FIXER_IGNORE_ENV=1 composer cs:list | |
shell: bash | |
psalm: | |
runs-on: ubuntu-latest | |
name: 'Psalm' | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.4' | |
tools: composer:v2 | |
- run: composer install --ignore-platform-req=php --quiet | |
shell: bash | |
- run: composer psalm | |
shell: bash | |
phpstan: | |
runs-on: ubuntu-latest | |
name: 'Phpstan' | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.4' | |
tools: composer:v2 | |
- run: composer install --ignore-platform-req=php --quiet | |
shell: bash | |
- run: composer phpstan | |
shell: bash | |
test-unit: | |
runs-on: ubuntu-latest | |
name: "Running unit tests for PHP ${{ matrix.php-version }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: ['8.2', '8.3', '8.4'] | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
tools: composer:v2 | |
- run: composer install --ignore-platform-req=php --quiet | |
shell: bash | |
- run: composer test | |
shell: bash | |
test-unit-coverage: | |
runs-on: ubuntu-latest | |
name: "Running unit test coverage" | |
timeout-minutes: 5 | |
needs: | |
- test-unit | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.4' | |
tools: composer:v2 | |
- run: composer install --ignore-platform-req=php --quiet | |
shell: bash | |
- run: composer test:coverage:xml | |
shell: bash | |
- uses: paambaati/[email protected] | |
env: | |
CC_TEST_REPORTER_ID: 203d856fbc3ebebe66cc94cccde4429973298c7fb919df64a1557850cc9c8345 | |
with: | |
coverageLocations: coverage.xml:clover | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: coverage.xml | |
path: coverage.xml | |
test-mutant: | |
runs-on: ubuntu-latest | |
name: 'Mutant Test' | |
timeout-minutes: 5 | |
continue-on-error: true | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.4' | |
tools: composer:v2 | |
- run: composer install --ignore-platform-req=php --quiet | |
shell: bash | |
- run: composer test:mutant | |
shell: bash |