-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Github actions for phpunit, remove Travis CI
- Loading branch information
Showing
3 changed files
with
106 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: "Continuous Integration" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "*.x" | ||
- "master" | ||
push: | ||
branches: | ||
- "*.x" | ||
- "master" | ||
|
||
jobs: | ||
phpunit: | ||
name: "PHPUnit" | ||
runs-on: "ubuntu-20.04" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.1" | ||
- "7.2" | ||
- "7.3" | ||
- "7.4" | ||
- "8.0" | ||
deps: | ||
- "normal" | ||
include: | ||
- deps: "low" | ||
php-version: "7.2" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
coverage: "pcov" | ||
ini-values: "zend.assertions=1" | ||
|
||
- name: "Cache dependencies installed with composer" | ||
uses: "actions/cache@v2" | ||
with: | ||
path: "~/.composer/cache" | ||
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" | ||
restore-keys: "php-${{ matrix.php-version }}-composer-locked-" | ||
|
||
- name: "Update dependencies with composer" | ||
run: "composer update --no-interaction --no-progress --no-suggest" | ||
if: "${{ matrix.deps == 'normal' }}" | ||
|
||
- name: "Install lowest possible dependencies with composer" | ||
run: "composer update --no-interaction --no-progress --no-suggest --prefer-dist --prefer-lowest" | ||
if: "${{ matrix.deps == 'low' }}" | ||
|
||
- name: "Run PHPUnit" | ||
run: "vendor/bin/phpunit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: "Static Analysis" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "*.x" | ||
- "master" | ||
push: | ||
branches: | ||
- "*.x" | ||
- "master" | ||
|
||
jobs: | ||
static-analysis-phpstan: | ||
name: "Static Analysis with PHPStan" | ||
runs-on: "ubuntu-20.04" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
|
||
steps: | ||
- name: "Checkout code" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{ matrix.php-version }}" | ||
tools: "cs2pr" | ||
|
||
- name: "Cache dependencies installed with composer" | ||
uses: "actions/cache@v2" | ||
with: | ||
path: "~/.composer/cache" | ||
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" | ||
restore-keys: "php-${{ matrix.php-version }}-composer-locked-" | ||
|
||
- name: "Install dependencies with composer" | ||
run: "composer install --no-interaction --no-progress --no-suggest" | ||
|
||
- name: "Run a static analysis with phpstan/phpstan" | ||
run: "vendor/bin/phpstan analyse -l 3 -c phpstan.neon --error-format=checkstyle lib/ tests/ | cs2pr" |
This file was deleted.
Oops, something went wrong.