Skip to content

Commit

Permalink
fix: tests pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpozzi committed Oct 16, 2024
1 parent 3ed9af8 commit af867e7
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 76 deletions.
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.current" } }}]}' < 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"
}
]
}

0 comments on commit af867e7

Please sign in to comment.