Skip to content

feature: Update to PHPUnit 10 #488

feature: Update to PHPUnit 10

feature: Update to PHPUnit 10 #488

Workflow file for this run

name: build
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**.php'
- .github/workflows/build.yml
- composer.json
pull_request:
paths:
- '**.php'
- .github/workflows/build.yml
- composer.json
jobs:
main:
name: Build [PHP ${{ matrix.php-version }}]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- '8.1'
- '8.2'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version}}
extensions: xdebug
coverage: xdebug
- name: Get composer cache directory
id: composer-cache
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.COMPOSER_CACHE_FILES_DIR }}
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.*') }}
restore-keys: |
composer-${{ runner.os }}-${{ matrix.php-version }}-
composer-${{ runner.os }}-
composer-
- name: Setup Composer's GitHub OAuth access
run: composer config --global github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: composer update --ansi
- name: Run PHP-CS-Fixer
run: vendor/bin/php-cs-fixer fix --ansi --verbose --dry-run --using-cache=no --diff
- name: Run PHPStan Static Analysis Check
run: vendor/bin/phpstan analyse --ansi
- name: Run Nexus Tachycardia Test Suite
run: vendor/bin/phpunit --color=always
env:
TACHYCARDIA_MONITOR_GA: enabled
- name: Run Coveralls
run: |
composer global require --ansi php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: PHP ${{ matrix.php-version }}
coveralls-finish:
name: Coveralls Finished
needs: [main]
runs-on: ubuntu-20.04
steps:
- name: Upload to Coveralls API
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true