Skip to content

update: 修复类型冲突 #21

update: 修复类型冲突

update: 修复类型冲突 #21

Workflow file for this run

name: tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
php:
- 8.0
- 8.1
- 8.2
experimental: [false]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, fileinfo #optional, setup extensions
coverage: none #optional, setup coverage driver
tools: phpunit:9
- name: Check Version
run: php -v && php -m && composer -V
- name: Validate composer.json and composer.lock
run: composer validate
- name: Get composer cache directory
id: composercache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache vendor
uses: actions/cache@v3
env:
cache-name: composer-cache
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-build-${{ env.cache-name }}
- name: Install dependencies (composer.lock)
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run test suite
run: composer exec -- phpunit -v