Skip to content

chore: Psalm

chore: Psalm #138

Workflow file for this run

name: Test
on:
push:
branches-ignore:
- 'master'
tags-ignore:
- '**'
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.1']
fail-fast: false
steps:
# Setup
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
tools: cs2pr, prestissimo
extensions: bcmath, intl
- name: Cache Dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache
key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
php${{ matrix.php-version }}-composer-
- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-progress --no-suggest
# Test
# - name: Codestyle
# run: php vendor/bin/phpcs -q --report=checkstyle | cs2pr
- name: PHPUnit Checks Matcher
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Unit Tests
run: |
php vendor/bin/phpunit --coverage-text=coverage.txt --colors=never
COVERAGE=$(php -r 'preg_match("#Lines:\s*(\d+.\d+)%#", file_get_contents("coverage.txt"), $out); echo $out[1];')
echo "COVERAGE=${COVERAGE}" >> $GITHUB_ENV
- name: Run Psalm
run: vendor/bin/psalm --output-format=github