Skip to content

Commit

Permalink
Switch to GitHub Actions (#26)
Browse files Browse the repository at this point in the history
* Add test action

* Remove Travis

* Fix tests

* Add phpstan ignore errors file

* Remove phpstan path

* Trigger Action

* Revert previous commit
  • Loading branch information
sandervanhooft authored Feb 14, 2022
1 parent 3ee26fe commit 3dcb2ff
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 28 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: tests
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [7.4, 8.0, 8.1]
name: PHP - ${{ matrix.php }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip
tools: composer:v2
coverage: none
- name: Install dependencies
run: |
composer update --prefer-dist --no-interaction --no-progress
- name: PHPStan
run: |
composer require "phpstan/phpstan:0.12.99"
vendor/bin/phpstan analyse --no-progress
- name: Execute tests
run: vendor/bin/phpunit --verbose
2 changes: 2 additions & 0 deletions .phpstan.ignoreErrors.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
parameters:
ignoreErrors: []
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
parameters:
level: 1
paths:
- %currentWorkingDirectory%/src
- %currentWorkingDirectory%/tests
excludes_analyse:
- %currentWorkingDirectory%/vendor
includes:
- .phpstan.ignoreErrors.neon

0 comments on commit 3dcb2ff

Please sign in to comment.