Skip to content
Merged
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
23 changes: 23 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,28 @@ jobs:
with:
php-version: '8.4'
coverage: none
- name: Resolve composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Restore composer cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
restore-keys: composer-${{ runner.os }}-${{ matrix.php }}-

- name: Drop cached laranail archives
# laranail/* resolve through a single MOVING v0.1.0 tag, so composer's dist
# cache is keyed on a name whose contents change underneath it. A restored
# archive is then silently stale: the install reports success and unpacks
# whatever was cached the first time. Everything else is immutable per
# version and stays cached.
# POSIX command via bash: Windows runners default to PowerShell, where this
# would be a parse error rather than a no-op.
shell: bash
run: rm -rf "$(composer config cache-files-dir)/laranail"

- run: composer update --prefer-dist --no-interaction --no-progress
- run: composer audit
92 changes: 92 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,29 @@ jobs:
php-version: '8.4'
extensions: dom, curl, libxml, mbstring, zip
coverage: none
- name: Resolve composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Restore composer cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
restore-keys: composer-${{ runner.os }}-${{ matrix.php }}-

- name: Drop cached laranail archives
# laranail/* resolve through a single MOVING v0.1.0 tag, so composer's dist
# cache is keyed on a name whose contents change underneath it. A restored
# archive is then silently stale: the install reports success and unpacks
# whatever was cached the first time. Everything else is immutable per
# version and stays cached.
# POSIX command via bash: Windows runners default to PowerShell, where this
# would be a parse error rather than a no-op.
shell: bash
run: rm -rf "$(composer config cache-files-dir)/laranail"

- run: composer update --prefer-dist --no-interaction --no-progress
- run: vendor/bin/phpstan analyse --no-progress --error-format=github

Expand All @@ -40,6 +63,29 @@ jobs:
with:
php-version: '8.4'
coverage: none
- name: Resolve composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Restore composer cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
restore-keys: composer-${{ runner.os }}-${{ matrix.php }}-

- name: Drop cached laranail archives
# laranail/* resolve through a single MOVING v0.1.0 tag, so composer's dist
# cache is keyed on a name whose contents change underneath it. A restored
# archive is then silently stale: the install reports success and unpacks
# whatever was cached the first time. Everything else is immutable per
# version and stays cached.
# POSIX command via bash: Windows runners default to PowerShell, where this
# would be a parse error rather than a no-op.
shell: bash
run: rm -rf "$(composer config cache-files-dir)/laranail"

- run: composer update --prefer-dist --no-interaction --no-progress
- run: vendor/bin/laranail-pint --test

Expand All @@ -55,6 +101,29 @@ jobs:
with:
php-version: '8.4'
coverage: none
- name: Resolve composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Restore composer cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
restore-keys: composer-${{ runner.os }}-${{ matrix.php }}-

- name: Drop cached laranail archives
# laranail/* resolve through a single MOVING v0.1.0 tag, so composer's dist
# cache is keyed on a name whose contents change underneath it. A restored
# archive is then silently stale: the install reports success and unpacks
# whatever was cached the first time. Everything else is immutable per
# version and stays cached.
# POSIX command via bash: Windows runners default to PowerShell, where this
# would be a parse error rather than a no-op.
shell: bash
run: rm -rf "$(composer config cache-files-dir)/laranail"

- run: composer update --prefer-dist --no-interaction --no-progress
- run: vendor/bin/rector process --dry-run

Expand All @@ -73,6 +142,29 @@ jobs:
php-version: '8.4'
extensions: dom, curl, libxml, mbstring, zip
coverage: none
- name: Resolve composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Restore composer cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
restore-keys: composer-${{ runner.os }}-${{ matrix.php }}-

- name: Drop cached laranail archives
# laranail/* resolve through a single MOVING v0.1.0 tag, so composer's dist
# cache is keyed on a name whose contents change underneath it. A restored
# archive is then silently stale: the install reports success and unpacks
# whatever was cached the first time. Everything else is immutable per
# version and stays cached.
# POSIX command via bash: Windows runners default to PowerShell, where this
# would be a parse error rather than a no-op.
shell: bash
run: rm -rf "$(composer config cache-files-dir)/laranail"

- run: composer update --prefer-dist --no-interaction --no-progress
- run: vendor/bin/pest --ci tests/Arch

Expand Down
97 changes: 93 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,19 @@ concurrency:

jobs:
test:
name: PHP ${{ matrix.php }} · L${{ matrix.laravel }} · ${{ matrix.stability }}
name: PHP ${{ matrix.php }} · ${{ matrix.stability }}
runs-on: ubuntu-latest
timeout-minutes: 15

strategy:
fail-fast: false
matrix:
php: ['8.4', '8.5']
laravel: ['13']
stability: [prefer-stable]
include:
# One lowest-dependency run on the floor. This is what catches a
# constraint claiming a floor the code does not actually hold to.
- php: '8.4'
laravel: '13'
stability: prefer-lowest

steps:
Expand All @@ -42,9 +40,31 @@ jobs:
extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, intl
coverage: none

- name: Resolve composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Restore composer cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
restore-keys: composer-${{ runner.os }}-${{ matrix.php }}-

- name: Drop cached laranail archives
# laranail/* resolve through a single MOVING v0.1.0 tag, so composer's dist
# cache is keyed on a name whose contents change underneath it. A restored
# archive is then silently stale: the install reports success and unpacks
# whatever was cached the first time. Everything else is immutable per
# version and stays cached.
# POSIX command via bash: Windows runners default to PowerShell, where this
# would be a parse error rather than a no-op.
shell: bash
run: rm -rf "$(composer config cache-files-dir)/laranail"

- name: Install dependencies
run: |
composer require "illuminate/contracts:^${{ matrix.laravel }}.0" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress

- name: Run the suite
Expand Down Expand Up @@ -75,6 +95,29 @@ jobs:
extensions: dom, curl, libxml, mbstring, zip
coverage: none

- name: Resolve composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Restore composer cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
restore-keys: composer-${{ runner.os }}-${{ matrix.php }}-

- name: Drop cached laranail archives
# laranail/* resolve through a single MOVING v0.1.0 tag, so composer's dist
# cache is keyed on a name whose contents change underneath it. A restored
# archive is then silently stale: the install reports success and unpacks
# whatever was cached the first time. Everything else is immutable per
# version and stays cached.
# POSIX command via bash: Windows runners default to PowerShell, where this
# would be a parse error rather than a no-op.
shell: bash
run: rm -rf "$(composer config cache-files-dir)/laranail"

- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-progress

Expand Down Expand Up @@ -113,6 +156,29 @@ jobs:
extensions: dom, curl, libxml, mbstring, zip
coverage: none

- name: Resolve composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Restore composer cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
restore-keys: composer-${{ runner.os }}-${{ matrix.php }}-

- name: Drop cached laranail archives
# laranail/* resolve through a single MOVING v0.1.0 tag, so composer's dist
# cache is keyed on a name whose contents change underneath it. A restored
# archive is then silently stale: the install reports success and unpacks
# whatever was cached the first time. Everything else is immutable per
# version and stays cached.
# POSIX command via bash: Windows runners default to PowerShell, where this
# would be a parse error rather than a no-op.
shell: bash
run: rm -rf "$(composer config cache-files-dir)/laranail"

- name: Install without the rendering engines
run: |
composer remove --dev --no-update gotenberg/gotenberg-php dompdf/dompdf
Expand Down Expand Up @@ -141,6 +207,29 @@ jobs:
extensions: dom, curl, libxml, mbstring, zip
coverage: none

- name: Resolve composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Restore composer cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
restore-keys: composer-${{ runner.os }}-${{ matrix.php }}-

- name: Drop cached laranail archives
# laranail/* resolve through a single MOVING v0.1.0 tag, so composer's dist
# cache is keyed on a name whose contents change underneath it. A restored
# archive is then silently stale: the install reports success and unpacks
# whatever was cached the first time. Everything else is immutable per
# version and stays cached.
# POSIX command via bash: Windows runners default to PowerShell, where this
# would be a parse error rather than a no-op.
shell: bash
run: rm -rf "$(composer config cache-files-dir)/laranail"

- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-progress

Expand Down