Add type assertion in isList
#7
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: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/php.yml" | |
- "**.php" | |
- "composer.json" | |
- "composer.lock" | |
- "phpcs.xml.dist" | |
- "phpstan.neon.dist" | |
- "phpunit.xml.dist" | |
push: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/php.yml" | |
- "**.php" | |
- "composer.json" | |
- "composer.lock" | |
- "phpcs.xml.dist" | |
- "phpstan.neon.dist" | |
- "phpunit.xml.dist" | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-ansi --no-interaction --no-progress | |
- name: Run linter | |
run: composer phpcs | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
version: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Get Composer cache directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Setup Composer cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: composer-${{ matrix.version }}-${{ hashFiles('**/composer.json') }} | |
restore-keys: php-${{ matrix.version }}-composer- | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.version }} | |
tools: composer:v2 | |
- name: Install dependencies | |
run: composer update --prefer-dist --no-ansi --no-interaction --no-progress | |
- name: Run test | |
run: | | |
composer phpstan | |
vendor/bin/phpunit --testdox --coverage-clover coverage.xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |