chore(tools): Remove PHPStan and tweak tooling to match what we're us… #796
Workflow file for this run
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: PHPUnit | |
on: | |
pull_request: | |
branches: | |
- develop | |
paths: | |
- '**.php' | |
- 'composer.*' | |
- 'phpunit*' | |
- '.github/workflows/test.yml' | |
push: | |
branches: | |
- develop | |
paths: | |
- '**.php' | |
- 'composer.*' | |
- 'phpunit*' | |
- '.github/workflows/test.yml' | |
jobs: | |
main: | |
name: PHP ${{ matrix.php-versions }} Unit Tests | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
strategy: | |
matrix: | |
php-versions: ['7.4', '8.0', '8.1', '8.2'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
tools: composer, phive, phpunit | |
extensions: intl, json, mbstring, gd, xdebug, xml, sqlite3 | |
coverage: xdebug | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get composer cache directory | |
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV | |
- name: Cache composer dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.COMPOSER_CACHE_FILES_DIR }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install dependencies (limited) | |
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }} | |
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader | |
- name: Install dependencies (authenticated) | |
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }} | |
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader | |
env: | |
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} | |
- name: Test with PHPUnit | |
run: vendor/bin/phpunit --verbose --coverage-text | |
env: | |
TERM: xterm-256color | |
TACHYCARDIA_MONITOR_GA: enabled |