Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions .github/workflows/full-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ on:
branches:
- master

permissions:
contents: read

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
full-checks:
name: "PHP version ${{ matrix.php-version }}, deps. ${{ matrix.dependencies }}"
Expand All @@ -27,11 +34,11 @@ jobs:
- "8.4"
- "8.5"
operating-system:
- "ubuntu-22.04"
- "ubuntu-24.04"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
Expand All @@ -42,14 +49,14 @@ jobs:

- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composercache.outputs.dir }}
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}-"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
Expand All @@ -65,4 +72,3 @@ jobs:

- name: "Full CI"
run: "composer ci"

2 changes: 1 addition & 1 deletion .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use PhpCsFixerCustomFixers\Fixer\MultilinePromotedPropertiesFixer;

$finder = PhpCsFixer\Finder::create()
->exclude('/tests/scratchpad')
->exclude('scratchpad')
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
->in(__DIR__ . '/tools')
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ fi
EOF

# Sort out git
RUN git config --global --add safe.directory /app
RUN git config --system --add safe.directory /app

WORKDIR /app/
2 changes: 0 additions & 2 deletions ci/cache/.gitignore

This file was deleted.

8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@
"@phpstan"
],
"composer-validate" : "@composer validate --no-check-all --strict",
"lint" : "parallel-lint src tests",
"lint" : "parallel-lint --exclude tests/scratchpad src tests",
"var-dump-checker" : "var-dump-check --ladybug --no-colors src",
"cs" : "php-cs-fixer fix -v --dry-run",
"cs-fix" : "php-cs-fixer fix -v",
"phpstan" : "phpstan -n --no-progress analyse",
"test" : [
"@putenv XDEBUG_MODE=coverage",
"phpunit --coverage-clover=reports/phpunit.xml"
"phpunit --coverage-clover=reports/clover.xml"
],
"test-with-coverage-check" : [
"@putenv XDEBUG_MODE=coverage",
"phpunit --coverage-clover=reports/phpunit.xml",
"coverage-check reports/phpunit.xml 100"
"phpunit --coverage-clover=reports/clover.xml",
"coverage-check reports/clover.xml 100"
]

}
Expand Down
8 changes: 8 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ services:
args:
PHP_VERSION: ""
tty: true
# Run as the host user so files written to the mounted volume (vendor, reports, test
# scratchpad, caches) are not owned by root on the host.
user: "${UID:-1000}:${GID:-1000}"
environment:
HOME: /tmp
COMPOSER_CACHE_DIR: /tmp/composer-cache
# Xdebug slows everything down; the composer test scripts enable it when needed.
XDEBUG_MODE: "${XDEBUG_MODE:-off}"
volumes:
- .:/app/:delegated
php82:
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</testsuite>
</testsuites>
<logging>
<junit outputFile="reports/coverage.xml"/>
<junit outputFile="reports/junit.xml"/>
</logging>
<source>
<include>
Expand Down
Loading