-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* testing php 8.1 * php 8.1 deprecation fixes * narrowing php versions
- Loading branch information
Showing
10 changed files
with
103 additions
and
76 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 |
---|---|---|
|
@@ -13,21 +13,14 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
operating-system: [ubuntu-latest] | ||
php-versions: ['7.2', '7.3', '7.4'] | ||
php-versions: ['7.4', '8.0', '8.1'] | ||
composer-args: ['', '--prefer-lowest'] | ||
include: | ||
- operating-system: ubuntu-latest | ||
php-versions: '8.0' | ||
composer-args: '--ignore-platform-reqs --no-scripts' | ||
- operating-system: ubuntu-latest | ||
php-versions: '8.0' | ||
composer-args: '--prefer-lowest --ignore-platform-reqs --no-scripts' | ||
runs-on: ${{ matrix.operating-system }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
uses: actions/checkout@v2.4.0 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@2.10.0 | ||
uses: shivammathur/setup-php@2.16.0 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: mbstring | ||
|
@@ -39,7 +32,7 @@ jobs: | |
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- name: Cache dependencies | ||
uses: actions/[email protected].4 | ||
uses: actions/[email protected].7 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: php${{ matrix.php-versions }}-composer-${{ matrix.composer-args }}-${{ hashFiles('**/composer.json') }} | ||
|
@@ -50,21 +43,14 @@ jobs: | |
- name: PHPStan | ||
run: composer phpstan | ||
- name: Code Style Check | ||
env: | ||
PHP_CS_FIXER_IGNORE_ENV: true | ||
run: composer style-check -- --format=checkstyle | cs2pr | ||
- name: Test | ||
run: composer test-with-coverage | ||
- name: Upload Coverage | ||
run: bash <(curl -s https://codecov.io/bash) -f ./clover.xml | ||
merge-me: | ||
name: Merge me! | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Merge me! | ||
uses: ridedott/merge-me-action@master | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
# This must be used as GitHub Actions token does not support | ||
# pushing to protected branches. | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_LOGIN: 'dependabot[bot]' | ||
files: ./clover.xml | ||
fail_ci_if_error: true | ||
verbose: true |
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,32 @@ | ||
name: Merge me! | ||
|
||
on: | ||
workflow_run: | ||
types: | ||
- completed | ||
workflows: | ||
- 'Build' | ||
|
||
jobs: | ||
merge-me: | ||
name: Merge me! | ||
runs-on: ubuntu-latest | ||
steps: | ||
- # It is often a desired behavior to merge only when a workflow execution | ||
# succeeds. This can be changed as needed. | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
name: Merge me! | ||
uses: ridedott/merge-me-action@v2 | ||
with: | ||
# Depending on branch protection rules, a manually populated | ||
# `GITHUB_TOKEN_WORKAROUND` secret with permissions to push to | ||
# a protected branch must be used. This secret can have an arbitrary | ||
# name, as an example, this repository uses `DOTTBOTT_TOKEN`. | ||
# | ||
# When using a custom token, it is recommended to leave the following | ||
# comment for other developers to be aware of the reasoning behind it: | ||
# | ||
# This must be used as GitHub Actions token does not support pushing | ||
# to protected branches. | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ENABLE_GITHUB_API_PREVIEW: true |
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 |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
/clover.xml | ||
.php_cs.cache | ||
.phpunit.result.cache | ||
.php-cs-fixer.cache |
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,22 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->exclude('vendor') | ||
->files() | ||
->in(__DIR__) | ||
; | ||
|
||
$config = new PhpCsFixer\Config(); | ||
return $config->setRiskyAllowed(true) | ||
->setRules(array( | ||
'@PSR2' => true, | ||
'@PHPUnit60Migration:risky' => true, | ||
'binary_operator_spaces' => array('operators' => array('=' => 'align', '=>' => 'align')), | ||
'single_quote' => true, | ||
'array_syntax' => array('syntax' => 'long'), | ||
'concat_space' => array('spacing' => 'one'), | ||
'psr_autoloading' => array('dir' => 'src'), | ||
)) | ||
->setUsingCache(true) | ||
->setFinder($finder); | ||
; |
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
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 |
---|---|---|
@@ -1,19 +1,13 @@ | ||
<phpunit | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
beStrictAboutTestsThatDoNotTestAnything="true" | ||
backupGlobals="true" | ||
stderr="true" | ||
colors="true"> | ||
<testsuites> | ||
<testsuite name="default"> | ||
<directory>./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist addUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">./src</directory> | ||
</whitelist> | ||
</filter> | ||
<?xml version="1.0"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" beStrictAboutTestsThatDoNotTestAnything="true" backupGlobals="true" stderr="true" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
<coverage includeUncoveredFiles="true"> | ||
<include> | ||
<directory suffix=".php">./src</directory> | ||
</include> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="default"> | ||
<directory>./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
</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