Skip to content

Commit

Permalink
feat: add testing on phpstan 1 and 2 (#3)
Browse files Browse the repository at this point in the history
* feat: add testing on phpstan 1 and 2

* chore: optimize timings of tests to not overdo it.
  • Loading branch information
bbrala authored Dec 5, 2024
1 parent 9a7490f commit 3c1b698
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
name: Tests

on:
push:
push: master
pull_request:
schedule:
- cron: '0 1 * * *'
- cron: '0 1 0 * *'

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.1', '8.2', '8.3' ]
phpstan: [ '^1.0', '^2.0' ]
steps:
- uses: actions/checkout@v4
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer
- run: composer install
- run: composer require phpstan/phpstan ${{ matrix.phpstan }}
- run: composer test

format:
Expand All @@ -42,12 +43,13 @@ jobs:
strategy:
matrix:
php: [ '8.1' ]
phpstan: [ '^1.0', '^2.0' ]
steps:
- uses: actions/checkout@v4
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer
- run: composer install
- run: composer require phpstan/phpstan ${{ matrix.phpstan }}
- run: composer analyse

0 comments on commit 3c1b698

Please sign in to comment.