Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @yoanm
4 changes: 0 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ on: # Build any PRs and main branch changes
# In case of updates to those workflows, they must be pre-checked by `pre-check-CI-updates.yml` rather than this workflow !
# Any updates on those workflows are expected to be restricted to those workflows only ! (no update on code for instance)
- '.github/workflows/pre-check-CI-updates.yml'
- '.github/workflows/CI.yml'
- '.github/workflows/coverage-upload.yml'
- '.github/workflows/reusable-CI-workflow.yml'
- '.github/workflows/reusable-coverage-upload-workflow.yml'
- '.github/workflows/auto-merge-dependabot.yml'
push:
branches: [ master ]
schedule:
Expand All @@ -29,7 +26,6 @@ concurrency:

env:
TEST_OUTPUT_STYLE: pretty
COMPOSER_OPTIONS: --optimize-autoloader

jobs:
tests:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/auto-merge-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ jobs:
uses: dependabot/fetch-metadata@v2.4.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Add custom labels
run: gh pr edit "${{github.event.pull_request.html_url}}" --add-label "with-nightly-tests"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Enable auto-merge for Dependabot PRs
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --squash "$PR_URL"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
checks: write # For the check run creation !

jobs:
upload:
coverage:
name: Coverage
permissions:
contents: read
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/pre-check-CI-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ on:
branches: [master] # Only for PR targeting master branch
paths: # /!\ Duplicate the same list as `on.pull_request.paths-ignore` property value for CI workflow !
- '.github/workflows/pre-check-CI-updates.yml' # This workflow
- '.github/workflows/CI.yml'
- '.github/workflows/coverage-upload.yml'
- '.github/workflows/reusable-CI-workflow.yml'
- '.github/workflows/reusable-coverage-upload-workflow.yml'
- '.github/workflows/auto-merge-dependabot.yml'

permissions:
contents: read
Expand All @@ -33,7 +30,7 @@ jobs:
contents: read
uses: ./.github/workflows/reusable-CI-workflow.yml

upload:
coverage:
name: Coverage
needs: [tests]
permissions:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ build
#A library must not provide a composer.lock file
composer.lock

#Phpunit
.phpunit.result.cache
6 changes: 5 additions & 1 deletion .remarkrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"plugins": [
"remark-preset-lint-consistent",
"remark-preset-lint-recommended"
"remark-preset-lint-recommended",
[
"remark-lint-list-item-indent",
"space"
]
]
}
1 change: 0 additions & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ build:
variables:
CI: 'true'
TEST_OUTPUT_STYLE: 'pretty'
COMPOSER_OPTIONS: '--optimize-autoloader'
COVERAGE_OUTPUT_STYLE: 'clover'
COVERAGE_CLOVER_FILE_PATH: 'build/coverage/clover.xml'
PHPCS_DISABLE_WARNING: 'true'
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,13 @@ scrutinizer-behat:
create-build-directories:
mkdir -p ${PHPUNIT_COVERAGE_DIRECTORY} ${BEHAT_COVERAGE_DIRECTORY} ${REPORTS_DIRECTORY}

.PHONY: configure-dev-env
configure-dev-env:
npm install --global remark-cli remark-preset-lint-consistent remark-preset-lint-recommended remark-lint-list-item-indent

.PHONY: lint-markdown
lint-markdown:
npx remark . --output

.PHONY: build install configure test test-unit test-functional codestyle create-build-directories scrutinizer-behat scrutinizer-phpunit
.DEFAULT: build
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

[![License](https://img.shields.io/github/license/yoanm/php-jsonrpc-server-sdk.svg)](https://github.com/yoanm/php-jsonrpc-server-sdk)
[![Code size](https://img.shields.io/github/languages/code-size/yoanm/php-jsonrpc-server-sdk.svg)](https://github.com/yoanm/php-jsonrpc-server-sdk)
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github\&repo=yoanm/php-jsonrpc-server-sdk)](https://dependabot.com)
![Dependabot Status](https://flat.badgen.net/github/dependabot/yoanm/php-jsonrpc-server-sdk)
![Last commit](https://badgen.net/github/last-commit/yoanm/php-jsonrpc-server-sdk)

[![Scrutinizer Build Status](https://img.shields.io/scrutinizer/build/g/yoanm/php-jsonrpc-server-sdk.svg?label=Scrutinizer\&logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/php-jsonrpc-server-sdk/build-status/master)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/yoanm/php-jsonrpc-server-sdk/master.svg?logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/php-jsonrpc-server-sdk/?branch=master)
Expand Down
37 changes: 17 additions & 20 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
backupStaticAttributes="false"
colors="true"
processIsolation="false"
Expand All @@ -24,22 +23,20 @@

bootstrap="vendor/autoload.php"
>
<listeners>
<listener class="Yoanm\PhpUnitExtended\Listener\YoanmTestsStrategyListener"/>
</listeners>

<testsuites>
<testsuite name="functional">
<directory>tests/Functional/*</directory>
</testsuite>
<testsuite name="technical">
<directory>tests/Technical/*</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>src</directory>
</whitelist>
</filter>
<coverage>
<include>
<directory>src</directory>
</include>
</coverage>
<listeners>
<listener class="Yoanm\PhpUnitExtended\Listener\YoanmTestsStrategyListener"/>
</listeners>
<testsuites>
<testsuite name="functional">
<directory>tests/Functional</directory>
</testsuite>
<testsuite name="technical">
<directory>tests/Technical</directory>
</testsuite>
</testsuites>
</phpunit>