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
4 changed files
with
186 additions
and
118 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,50 @@ | ||
name: Perform Benchmarks | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'doc/**' | ||
- 'mkdocs.yml' | ||
- '*.md' | ||
push: | ||
paths-ignore: | ||
- 'doc/**' | ||
- 'mkdocs.yml' | ||
- '*.md' | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
extensions: mbstring, intl, readline | ||
ini-values: memory_limit=-1 | ||
coverage: none | ||
tools: composer:v2, cs2pr | ||
|
||
- name: "Cache dependencies" | ||
uses: "actions/cache@v2" | ||
with: | ||
path: | | ||
~/.composer/cache | ||
vendor | ||
key: "php-7.4-latest" | ||
restore-keys: "php-7.4-latest" | ||
|
||
- name: Install dependencies | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
composer install --no-interaction --no-progress --no-suggest | ||
composer show | ||
- name: Run benchmarks | ||
shell: bash | ||
run: "vendor/bin/phpbench run --revs=2 --iterations=2 --report=aggregate" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: "Check Coding Standards" | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'doc/**' | ||
- 'mkdocs.yml' | ||
- '*.md' | ||
push: | ||
paths-ignore: | ||
- 'doc/**' | ||
- 'mkdocs.yml' | ||
- '*.md' | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
extensions: mbstring, intl, readline | ||
ini-values: memory_limit=-1 | ||
coverage: none | ||
tools: composer:v2, cs2pr | ||
|
||
- name: "Cache dependencies" | ||
uses: "actions/cache@v2" | ||
with: | ||
path: | | ||
~/.composer/cache | ||
vendor | ||
key: "php-7.4-latest" | ||
restore-keys: "php-7.4-latest" | ||
|
||
- name: Install dependencies | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
composer install --no-interaction --no-progress --no-suggest | ||
composer show | ||
- name: Run CS checks | ||
shell: bash | ||
run: "vendor/bin/phpcs -q --report=checkstyle | cs2pr" |
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,86 @@ | ||
name: "Execute Unit Tests" | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'doc/**' | ||
- 'mkdocs.yml' | ||
- '*.md' | ||
push: | ||
paths-ignore: | ||
- 'doc/**' | ||
- 'mkdocs.yml' | ||
- '*.md' | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: | ||
- "7.3" | ||
- "7.4" | ||
- "8.0" | ||
deps-version: | ||
- "lowest" | ||
- "latest" | ||
include: | ||
- php-version: "7.4" | ||
deps-version: "latest" | ||
coverage: "xdebug" | ||
- php-version: "8.0" | ||
composer-args: "--no-interaction --no-progress --no-suggest --ignore-platform-reqs" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: mbstring, intl, readline | ||
ini-values: memory_limit=-1 | ||
coverage: ${{ matrix.coverage || 'none' }} | ||
tools: composer:v2 | ||
|
||
- name: "Cache dependencies" | ||
uses: "actions/cache@v2" | ||
with: | ||
path: | | ||
~/.composer/cache | ||
vendor | ||
key: "php-${{ matrix.php-version }}-${{ matrix.deps-version }}" | ||
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.deps-version }}" | ||
|
||
- name: Install dependencies | ||
env: | ||
COVERAGE_DEPS: 'php-coveralls/php-coveralls' | ||
DEPS: ${{ matrix.deps-version }} | ||
COMPOSER_ARGS: ${{ matrix.composer-args || '--no-interaction --no-progress --no-suggest' }} | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TEST_COVERAGE: ${{ matrix.coverage || '' }} | ||
shell: bash | ||
run: | | ||
composer install $COMPOSER_ARGS | ||
if [[ $DEPS == 'latest' ]]; then composer update $COMPOSER_ARGS ; fi | ||
if [[ $DEPS == 'lowest' ]]; then composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi | ||
if [[ $TEST_COVERAGE != '' ]]; then composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi | ||
composer show | ||
- name: Setup problem matcher for PHPUnit | ||
run: echo "::add-matcher${{ runner.tool_cache }}/phpunit.json" | ||
|
||
- name: Run unit tests | ||
env: | ||
TEST_COVERAGE: ${{ matrix.coverage || '' }} | ||
shell: bash | ||
run: | | ||
if [[ $TEST_COVERAGE != '' ]]; then composer test-coverage ; else composer test ; fi | ||
- name: Upload coverage | ||
if: matrix.coverage | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: "vendor/bin/php-coveralls -v" |