Skip to content

Fix memory exhaustion when reading corrupted FPT memo files #57

Fix memory exhaustion when reading corrupted FPT memo files

Fix memory exhaustion when reading corrupted FPT memo files #57

Workflow file for this run

name: tests
on:
pull_request:
push:
branches:
- master
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: php-actions/composer@v6
- name: PHPStan
uses: chindit/actions-phpstan@master
with:
arguments: 'src/'
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [7.1, 7.2, 7.3, 7.4, 8.0]
dependencies: [highest]
include:
- php-version: 7.1
dependencies: lowest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
ini-values: zend.assertions=1
- name: Install dependencies with Composer
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependencies }}
- name: Install Codeclimate binary
run: |
curl -L -f https://codeclimate.com/downloads/test-reporter/test-reporter-0.11.1-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
- name: Run Codeclimate before-build
run: ./cc-test-reporter before-build
- name: Run PHPUnit
run: vendor/bin/phpunit --coverage-clover=clover.xml
- name: Upload clover artifact
uses: actions/upload-artifact@v4
with:
name: clover-${{ matrix.php-version }}-${{ matrix.dependencies }}
path: clover.xml
- name: Run Codeclimate format-coverage
run: ./cc-test-reporter format-coverage -o codeclimate.json -t clover clover.xml
- name: Upload codeclimate artifact
uses: actions/upload-artifact@v4
with:
name: cc-${{ matrix.php-version }}-${{ matrix.dependencies }}
path: codeclimate.json
codeclimate-upload:
name: Upload coverage to Codeclimate
runs-on: ubuntu-latest
needs: phpunit
env:
CC_TEST_REPORTER_ID: e33b74ed1f59947df361652193b6575db0afc663dcbc73af89a0cf16f2443d24
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: coverage
- name: Install Codeclimate binary
run: |
curl -L -f https://codeclimate.com/downloads/test-reporter/test-reporter-0.11.1-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
- name: Upload to Codeclimate
run: |
./cc-test-reporter sum-coverage coverage/cc-*/codeclimate.json -p 6
./cc-test-reporter upload-coverage
coveralls-upload:
name: Upload coverage to Coveralls
runs-on: ubuntu-latest
needs: phpunit
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: build/logs
- name: Install php-coveralls
run: composer global require php-coveralls/php-coveralls
- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: php-coveralls --coverage_clover="build/logs/clover-*/clover.xml" -v