Skip to content

Next

Next #6

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: []
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
php_version: [8.0, 8.1, 8.2, 8.3]
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
tools: composer:v2
extensions: apcu
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Dependencies
run: composer install --no-interaction --prefer-dist --optimize-autoloader
- run: cp ./tests/Includes/Config.yaml ./src/Config/Config.yaml
- run: php src/Vendor/bin/phpunit tests
PHPStan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: php-actions/composer@v6
- uses: php-actions/phpstan@v3
with:
configuration: phpstan.neon
memory_limit: 256M
version: latest