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 ba897a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 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: [{url: "path", url: "src/Core"}]}' < composer.json) > composer.json
- name: composer install
run: |
composer install
Expand Down

0 comments on commit ba897a1

Please sign in to comment.