Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ruudk committed Oct 2, 2024
1 parent 2d315e9 commit 4695659
Show file tree
Hide file tree
Showing 8 changed files with 1,898 additions and 20 deletions.
47 changes: 37 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,47 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ '8.1', '8.2', '8.3', '8.4' ]
dependency-versions: [ lowest, highest ]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '${{ matrix.php }}'
coverage: none

- name: Install Composer packages
uses: ramsey/composer-install@v3
with:
dependency-versions: '${{ matrix.dependency-versions }}'

- name: Run tests
run: vendor/bin/phpunit --colors=always

phpstan:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'

- name: Install Composer packages
uses: ramsey/composer-install@v3
- name: Install Composer packages
uses: ramsey/composer-install@v3
with:
dependency-versions: '${{ matrix.dependency-versions }}'

- name: Run PHPStan
run: vendor/bin/phpstan --ansi
- name: Run PHPStan
run: vendor/bin/phpstan --ansi
8 changes: 8 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
"TicketSwap\\PHPStanErrorFormatter\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"TicketSwap\\PHPStanErrorFormatter\\": "tests/"
}
},
"extra": {
"phpstan": {
"includes": [
Expand All @@ -22,5 +27,8 @@
},
"config": {
"sort-packages": true
},
"require-dev": {
"phpunit/phpunit": "^10"
}
}
Loading

0 comments on commit 4695659

Please sign in to comment.