Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tests pipeline #510

Draft
wants to merge 1 commit into
base: v2-unstable
Choose a base branch
from
Draft
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
14 changes: 7 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: shivammathur/setup-php@v2
- name: Validate composer.json
run: |
(cd src/Bundle && composer validate --strict --no-check-lock)
(cd src/Framework/Symfony && composer validate --strict --no-check-lock)
tests:
runs-on: ubuntu-20.04
strategy:
Expand Down Expand Up @@ -50,16 +50,16 @@ jobs:
with:
php-version: ${{ matrix.php }}
- run: |
sed -ri 's/"symfony\/(.+)": "(.+)"/"symfony\/\1": "'${{ matrix.symfony }}'"/' src/Bundle/composer.json;
sed -ri 's/"symfony\/(.+)": "(.+)"/"symfony\/\1": "'${{ matrix.symfony }}'"/' src/Framework/Symfony/composer.json;
if: matrix.symfony
- run: |
composer config minimum-stability dev
composer config prefer-stable true
if: matrix.beta
- run: |
(cd src/Bundle && composer update --prefer-dist --no-interaction --no-progress --ansi ${{ matrix.composer_option }})
(cd src/Framework/Symfony && composer update --prefer-dist --no-interaction --no-progress --ansi ${{ matrix.composer_option }})
- run: |
(cd src/Bundle && vendor/bin/phpunit)
(cd src/Framework/Symfony && vendor/bin/phpunit)
tests-windows:
runs-on: windows-2022
strategy:
Expand Down Expand Up @@ -95,13 +95,13 @@ jobs:
with:
php-version: ${{ matrix.php }}
- run: |
(Get-Content composer.json) -replace '("symfony/[^"]+": )"[^"]+"', '$1"${{ matrix.symfony }}"' | Out-File -encoding ASCII src/Bundle/composer.json
(Get-Content composer.json) -replace '("symfony/[^"]+": )"[^"]+"', '$1"${{ matrix.symfony }}"' | Out-File -encoding ASCII src/Framework/Symfony/composer.json
if: matrix.symfony
- run: |
composer config minimum-stability dev
composer config prefer-stable true
if: matrix.beta
- run: |
{cd src/Bundle && composer update --prefer-dist --no-interaction --no-progress --ansi ${{ matrix.composer_option }}}
{cd src/Framework/Symfony && composer update --prefer-dist --no-interaction --no-progress --ansi ${{ matrix.composer_option }}}
- run: |
{cd src/Bundle && vendor/bin/phpunit}
{cd src/Framework/Symfony && vendor/bin/phpunit}
9 changes: 4 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,16 @@ jobs:
- knplabs/snappy
path:
- ./
# include: ${{ fromJson(needs.packages.outputs.packages) }}
include: ${{ fromJson(needs.packages.outputs.packages) }}
defaults:
run:
working-directory: ${{ matrix.path }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
src/Core/
${{ matrix.path }}
- uses: shivammathur/setup-php@v2
- name: composer patch
run: |
cat <<< $(jq '.+{repositories: [{type: "path", url: "${{ github.workspace }}/src/Core", options: { versions: { "knplabs/snappy-core": "self.version" } }}]}' < composer.json) > composer.json
- name: composer install
run: |
composer install
Expand Down
133 changes: 69 additions & 64 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,69 +1,74 @@
{
"name": "knplabs/knp-snappy",
"description": "PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Wrapper for wkhtmltopdf/wkhtmltoimage.",
"license": "MIT",
"type": "library",
"keywords": [
"pdf",
"thumbnail",
"snapshot",
"knplabs",
"knp",
"wkhtmltopdf"
],
"authors": [
{
"name": "KNP Labs Team",
"homepage": "http://knplabs.com"
},
{
"name": "Symfony Community",
"homepage": "http://github.com/KnpLabs/snappy/contributors"
}
],
"homepage": "http://github.com/KnpLabs/snappy",
"require": {
"php": ">=8.1",
"dompdf/dompdf": "^3.0",
"psr/http-factory": "^1.1",
"psr/http-message": "^2.0",
"psr/log": "^2.0|^3.0",
"symfony/config": "^5.4|^6.4|^7.1",
"symfony/dependency-injection": "^5.4|^6.4|^7.1",
"symfony/http-client": "^5.4|^6.4|^7.1",
"symfony/http-kernel": "^5.4|^6.4|^7.1",
"symfony/process": "^5.4|^6.4|^7.1"
"name": "knplabs/knp-snappy",
"description": "PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Wrapper for wkhtmltopdf/wkhtmltoimage.",
"license": "MIT",
"type": "library",
"keywords": [
"pdf",
"thumbnail",
"snapshot",
"knplabs",
"knp",
"wkhtmltopdf"
],
"authors": [
{
"name": "KNP Labs Team",
"homepage": "http://knplabs.com"
},
"require-dev": {
"nyholm/psr7": "^1.8",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^1.12",
"phpstan/phpstan-phpunit": "^1.4",
"phpunit/phpunit": "^11.4"
},
"replace": {
"knplabs/snappy-bundle": "self.version",
"knplabs/snappy-core": "self.version",
"knplabs/snappy-dompdf": "self.version",
"knplabs/snappy-wkhtmltopdf": "self.version"
},
"autoload": {
"psr-4": {
"KNPLabs\\Snappy\\Backend\\Dompdf\\": "src/Backend/Dompdf/",
"KNPLabs\\Snappy\\Backend\\WkHtmlToPdf\\": "src/Backend/WkHtmlToPdf/",
"KNPLabs\\Snappy\\Core\\": "src/Core/",
"KNPLabs\\Snappy\\Framework\\Symfony\\": "src/Framework/Symfony/"
}
},
"config": {
"allow-plugins": {
"phpstan/extension-installer": true
},
"sort-packages": true
{
"name": "Symfony Community",
"homepage": "http://github.com/KnpLabs/snappy/contributors"
}
],
"homepage": "http://github.com/KnpLabs/snappy",
"require": {
"php": ">=8.1",
"dompdf/dompdf": "^3.0",
"psr/http-factory": "^1.1",
"psr/http-message": "^2.0",
"psr/log": "^2.0|^3.0",
"symfony/config": "^5.4|^6.4|^7.1",
"symfony/dependency-injection": "^5.4|^6.4|^7.1",
"symfony/http-client": "^5.4|^6.4|^7.1",
"symfony/http-kernel": "^5.4|^6.4|^7.1",
"symfony/process": "^5.4|^6.4|^7.1"
},
"require-dev": {
"nyholm/psr7": "^1.8",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^1.12",
"phpstan/phpstan-phpunit": "^1.4",
"phpunit/phpunit": "^11.4"
},
"replace": {
"knplabs/snappy-bundle": "self.version",
"knplabs/snappy-core": "self.version",
"knplabs/snappy-dompdf": "self.version",
"knplabs/snappy-wkhtmltopdf": "self.version"
},
"autoload": {
"psr-4": {
"KNPLabs\\Snappy\\Backend\\Dompdf\\": "src/Backend/Dompdf/",
"KNPLabs\\Snappy\\Backend\\WkHtmlToPdf\\": "src/Backend/WkHtmlToPdf/",
"KNPLabs\\Snappy\\Core\\": "src/Core/",
"KNPLabs\\Snappy\\Framework\\Symfony\\": "src/Framework/Symfony/"
}
},
"config": {
"allow-plugins": {
"phpstan/extension-installer": true
},
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
}
"sort-packages": true
},
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
}
},
"repositories": [
{
"url": "src/Core"
}
]
}
Loading