Skip to content

Commit

Permalink
Sync CI script
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Nov 16, 2024
1 parent 927ce2f commit 286d343
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ jobs:
if ${{ matrix.prefer-lowest == 'prefer-lowest' }}
then
composer update --prefer-lowest --prefer-stable
composer require --dev dereuromark/composer-prefer-lowest:dev-master
else
composer install --no-progress --prefer-dist --optimize-autoloader
fi
if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then composer require --dev dereuromark/composer-prefer-lowest:dev-master; fi
- name: Run PHPUnit
run: |
if [[ ${{ matrix.db-type }} == 'sqlite' ]]; then export DB_URL='sqlite:///:memory:'; fi
Expand All @@ -74,7 +74,8 @@ jobs:
vendor/bin/phpunit
fi
- name: Validate prefer-lowest
run: if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then vendor/bin/validate-prefer-lowest -m; fi
if: matrix.prefer-lowest == 'prefer-lowest'
run: vendor/bin/validate-prefer-lowest -m

- name: Upload coverage reports to Codecov
if: success() && matrix.php-version == '8.1'
Expand Down
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
"scripts": {
"cs-check": "phpcs --extensions=php",
"cs-fix": "phpcbf --extensions=php",
"lowest": "validate-prefer-lowest",
"lowest-setup": "composer update --prefer-lowest --prefer-stable --prefer-dist --no-interaction && cp composer.json composer.backup && composer require --dev dereuromark/composer-prefer-lowest && mv composer.backup composer.json",
"stan": "phpstan analyse",
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^1.0.0 && mv composer.backup composer.json",
"test": "vendor/bin/phpunit",
Expand Down

0 comments on commit 286d343

Please sign in to comment.