-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
588 additions
and
81 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,35 @@ | ||
name: cloc | ||
on: | ||
pull_request: | ||
jobs: | ||
cloc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
path: pr | ||
- name: Checkout base code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.base.sha }} | ||
path: base | ||
- name: Count Lines Of Code | ||
id: loc | ||
run: | | ||
curl -OL https://github.com/vearutop/sccdiff/releases/download/v1.0.1/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz | ||
OUTPUT=$(cd pr && ../sccdiff -basedir ../base) | ||
OUTPUT="${OUTPUT//'%'/'%25'}" | ||
OUTPUT="${OUTPUT//$'\n'/'%0A'}" | ||
OUTPUT="${OUTPUT//$'\r'/'%0D'}" | ||
echo "::set-output name=diff::$OUTPUT" | ||
- name: Comment Code Lines | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
header: LOC | ||
message: | | ||
### Lines Of Code | ||
${{ steps.loc.outputs.diff }} |
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,37 @@ | ||
name: lint | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
jobs: | ||
run: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: [ 'ubuntu-latest' ] | ||
php-versions: [ '7.4' ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache vendor | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
vendor | ||
key: vendor-${{ hashFiles('composer.lock') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
ini-values: post_max_size=256M, max_execution_time=180 | ||
tools: composer | ||
|
||
- name: Populate vendor | ||
run: '[ -e vendor ] || composer install' | ||
|
||
- name: Lint | ||
run: make lint |
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,38 @@ | ||
name: test-unit-cov | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
jobs: | ||
run: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: [ 'ubuntu-latest' ] | ||
php-versions: [ '7.4' ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache vendor | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
vendor | ||
key: deps-${{ hashFiles('composer.lock') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
ini-values: post_max_size=256M, max_execution_time=180 | ||
coverage: xdebug | ||
tools: composer | ||
|
||
- name: Populate vendor | ||
run: '[ -e vendor ] || (composer install && patch -s -p0 < ./tests/phpunit.patch)' | ||
|
||
- name: Run Tests With Coverage | ||
run: make deps test-coverage && bash <(curl -s https://codecov.io/bash) |
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,37 @@ | ||
name: test-unit | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
jobs: | ||
run: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: [ 'ubuntu-latest' ] | ||
php-versions: [ '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '8.0', '8.1' ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache vendor | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
vendor | ||
key: deps-${{ hashFiles('composer.lock') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
ini-values: post_max_size=256M, max_execution_time=180 | ||
tools: composer | ||
|
||
- name: Populate vendor | ||
run: '[ -e vendor ] || (composer install && patch -s -p0 < ./tests/phpunit.patch)' | ||
|
||
- name: Run Tests | ||
run: make deps test |
This file was deleted.
Oops, something went wrong.
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
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,8 @@ | ||
parameters: | ||
inferPrivatePropertyTypeFromConstructor: true | ||
checkMissingIterableValueType: false | ||
checkGenericClassInNonGenericObjectType: false | ||
ignoreErrors: | ||
- '#has no return typehint specified#' | ||
- '#with no typehint specified#' | ||
- '#has no typehint specified#' |
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
Oops, something went wrong.