Skip to content

Add tests #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

[*.neon]
indent_style = tab
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/vendor/
/.phpunit.cache
10 changes: 9 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@
"license": "MIT",
"autoload": {
"psr-4": {
"TicketSwap\\PHPstanErrorFormatter\\": "src/"
"TicketSwap\\PHPStanErrorFormatter\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"TicketSwap\\PHPStanErrorFormatter\\": "tests/"
}
},
"extra": {
Expand All @@ -22,5 +27,8 @@
},
"config": {
"sort-packages": true
},
"require-dev": {
"phpunit/phpunit": "^10.5.35"
}
}
Loading