-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from peter-gribanov/gitlab_ci
Build from GitHub CI
- Loading branch information
Showing
5 changed files
with
120 additions
and
74 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,34 @@ | ||
name: Quality assurance | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
phpstan: | ||
name: PHPStan | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install PHP with extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.1 | ||
coverage: none | ||
tools: composer:v2 | ||
|
||
- name: Install variant | ||
run: composer require phpstan/phpstan:"0.12.*" --no-update | ||
|
||
- name: Install Composer dependencies (highest) | ||
uses: "ramsey/composer-install@v1" | ||
with: | ||
dependency-versions: "highest" | ||
composer-options: "--prefer-dist --prefer-stable" | ||
|
||
- name: PHPStan | ||
run: vendor/bin/phpstan --memory-limit=1G analyse |
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,84 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
pull_request: | ||
branches: | ||
|
||
jobs: | ||
test: | ||
name: PHP ${{ matrix.php-version }} + ${{ matrix.dependencies }} + ${{ matrix.variant }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
continue-on-error: ${{ matrix.allowed-to-fail }} | ||
|
||
strategy: | ||
max-parallel: 6 | ||
matrix: | ||
php-version: | ||
- '5.5' | ||
- '5.6' | ||
- '7.0' | ||
- '7.1' | ||
- '7.2' | ||
- '7.3' | ||
- '7.4' | ||
dependencies: [highest] | ||
allowed-to-fail: [false] | ||
variant: [normal] | ||
include: | ||
- php-version: '5.5' | ||
dependencies: highest | ||
allowed-to-fail: false | ||
variant: 'symfony/symfony:"2.7.*"' | ||
- php-version: '5.5' | ||
dependencies: highest | ||
allowed-to-fail: false | ||
variant: 'symfony/symfony:"2.8.*"' | ||
- php-version: '5.5' | ||
dependencies: highest | ||
allowed-to-fail: false | ||
variant: 'symfony/symfony:"3.4.*"' | ||
- php-version: '7.1' | ||
dependencies: highest | ||
allowed-to-fail: false | ||
variant: 'symfony/symfony:"4.4.*" phpunit/phpunit:"5.7.*"' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install PHP with extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
coverage: xdebug | ||
tools: composer:v2 | ||
extensions: zlib, bz2 | ||
|
||
- name: Install variant | ||
if: matrix.variant != 'normal' | ||
run: composer require ${{ matrix.variant }} --no-update | ||
|
||
- name: "Install Composer dependencies (${{ matrix.dependencies }})" | ||
uses: "ramsey/composer-install@v1" | ||
with: | ||
dependency-versions: "${{ matrix.dependencies }}" | ||
composer-options: "--prefer-dist --prefer-stable" | ||
|
||
- name: Run Tests | ||
run: vendor/bin/phpunit --coverage-clover build/coverage-clover.xml | ||
|
||
- name: Send coverage results to Scrutinizer CI | ||
run: | | ||
wget https://scrutinizer-ci.com/ocular.phar | ||
php ocular.phar code-coverage:upload --format=php-clover build/coverage-clover.xml | ||
- name: Send coverage results to Coveralls | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
composer global require php-coveralls/php-coveralls | ||
php-coveralls --coverage_clover=build/coverage-clover.xml -v -c .coveralls.yml |
This file was deleted.
Oops, something went wrong.
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
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