Skip to content

Commit e667126

Browse files
authored
Harmonize CI & files (#41)
1 parent d52d1e3 commit e667126

File tree

11 files changed

+72
-50
lines changed

11 files changed

+72
-50
lines changed

.github/workflows/auto-merge-dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ jobs:
1818
uses: dependabot/fetch-metadata@v2.4.0
1919
with:
2020
github-token: "${{ secrets.GITHUB_TOKEN }}"
21+
22+
- name: Add custom labels
23+
run: gh pr edit "${{github.event.pull_request.html_url}}" --add-label "with-nightly-tests"
24+
env:
25+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
26+
2127
- name: Enable auto-merge for Dependabot PRs
2228
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
2329
run: gh pr merge --auto --squash "$PR_URL"

.github/workflows/coverage-upload.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions:
99
checks: write # For the check run creation !
1010

1111
jobs:
12-
upload:
12+
coverage:
1313
name: Coverage
1414
permissions:
1515
contents: read

.github/workflows/pre-check-CI-updates.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
contents: read
3131
uses: ./.github/workflows/reusable-CI-workflow.yml
3232

33-
upload:
33+
coverage:
3434
name: Coverage
3535
needs: [tests]
3636
permissions:

.github/workflows/reusable-CI-workflow.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,23 @@ jobs:
6060
- job-name: Up to date versions # => Highest versions allowed by composer config
6161
php-version: '${{ needs.fetch-supported-versions.outputs.php-max }}'
6262
symfony-version: '${{ needs.fetch-supported-versions.outputs.symfony-max }}'
63-
## Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
63+
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
6464
pkg-extra-constraints: behat/gherkin:~4.12.0
6565
- job-name: Up to date versions - Special case - Symfony 5.4
6666
php-version: '${{ needs.fetch-supported-versions.outputs.php-max }}'
6767
symfony-version: '5.4'
68-
## Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
68+
# Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317)
6969
# Fix - symfony/yaml - Avoid issue with Sf YAML 6.4+ and Framework bundle
70-
pkg-extra-constraints: behat/gherkin:~4.12.0 symfony/yaml:~6.4.0
70+
pkg-extra-constraints: behat/gherkin:~4.12.0 ${{ ( needs.fetch-supported-versions.outputs.symfony-max == '6.4' ) && 'symfony/yaml:~6.4.0' || '' }}
7171
- job-name: Bare minimum # => Lowest versions allowed by composer config
7272
php-version: '${{ needs.fetch-supported-versions.outputs.php-min }}'
7373
symfony-version: '${{ needs.fetch-supported-versions.outputs.symfony-min }}'
7474
- job-name: Bare minimum - Special case - Symfony 5.4
7575
php-version: '${{ needs.fetch-supported-versions.outputs.php-min }}'
7676
symfony-version: '5.4'
7777
- job-name: Late migration - PHP # => Highest symfony version with lowest php version allowed by composer config
78-
php-version: ${{ ( needs.fetch-supported-versions.outputs.symfony-max == '6.4' && needs.fetch-supported-versions.outputs.php-min == '8.0' ) && '8.1' || needs.fetch-supported-versions.outputs.php-min }} # Fix - Sf 6.4 require php 8.1 minimum !
78+
# Fix - Sf 6.4 require php 8.1 minimum !
79+
php-version: ${{ ( needs.fetch-supported-versions.outputs.symfony-max == '6.4' && needs.fetch-supported-versions.outputs.php-min == '8.0' ) && '8.1' || needs.fetch-supported-versions.outputs.php-min }}
7980
symfony-version: '${{ needs.fetch-supported-versions.outputs.symfony-max }}'
8081
- job-name: Late migration - Symfony # => Lowest symfony version with highest php version allowed by composer config
8182
php-version: '${{ needs.fetch-supported-versions.outputs.php-max }}'
@@ -217,9 +218,9 @@ jobs:
217218
needs: [ fetch-supported-versions, tests ]
218219
if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'with-nightly-tests') ) }}
219220
runs-on: ubuntu-latest
220-
continue-on-error: true
221221
permissions:
222222
contents: read
223+
continue-on-error: true
223224
env:
224225
COMPOSER_IGNORE_PLATFORM_REQ: 'php+'
225226
strategy:

.remarkrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"plugins": [
33
"remark-preset-lint-consistent",
4-
"remark-preset-lint-recommended"
4+
"remark-preset-lint-recommended",
5+
[
6+
"remark-lint-list-item-indent",
7+
"space"
8+
]
59
]
610
}

.scrutinizer.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ build:
4141
variables:
4242
CI: 'true'
4343
TEST_OUTPUT_STYLE: 'pretty'
44-
COMPOSER_OPTIONS: '--optimize-autoloader'
4544
COVERAGE_OUTPUT_STYLE: 'clover'
4645
COVERAGE_CLOVER_FILE_PATH: 'build/coverage/clover.xml'
4746
PHPCS_DISABLE_WARNING: 'true'

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ include:
2323
Examples of unacceptable behavior by participants include:
2424

2525
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
26+
advances
2727
* Trolling, insulting/derogatory comments, and personal or political attacks
2828
* Public or private harassment
2929
* Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
30+
address, without explicit permission
3131
* Other conduct which could reasonably be considered inappropriate in a
32-
professional setting
32+
professional setting
3333

3434
## Our Responsibilities
3535

CONTRIBUTING.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,39 @@
11
# Contributing
22

33
## Getting Started
4-
* Fork, then clone the repo:
4+
5+
* Fork, then clone the repo:
6+
57
```bash
68
git clone git@github.com:your-username/php-jsonrpc-params-symfony-constraint-doc-sdk.git
7-
````
9+
```
10+
11+
* Make sure everything goes well:
812

9-
* Make sure everything goes well:
1013
```bash
1114
make build
1215
make test
1316
```
1417

15-
* Make your changes (Add/Update tests according to your changes).
16-
* Make sure tests are still green:
18+
* Make your changes (Add/Update tests according to your changes).
19+
* Make sure tests are still green:
20+
1721
```bash
1822
make test
1923
```
2024

21-
* To check code coverage, launch
25+
* To check code coverage, launch
26+
2227
```bash
2328
make coverage
2429
```
2530

26-
* Push to your fork and [submit a pull request](https://github.com/yoanm/php-jsonrpc-params-symfony-constraint-doc-sdk/compare/).
27-
* Wait for feedback or merge.
31+
* Push to your fork and [submit a pull request](https://github.com/yoanm/php-jsonrpc-params-symfony-constraint-doc-sdk/compare/).
32+
* Wait for feedback or merge.
33+
34+
Some stuff that will increase your pull request's acceptance:
2835

29-
Some stuff that will increase your pull request's acceptance:
30-
* Write tests.
31-
* Follow PSR-2 coding style.
32-
* Write good commit messages.
33-
* Do not rebase or squash your commits when a review has been made.
36+
* Write tests.
37+
* Follow PSR-2 coding style.
38+
* Write good commit messages.
39+
* Do not rebase or squash your commits when a review has been made.

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,5 +109,13 @@ scrutinizer-behat:
109109
create-build-directories:
110110
mkdir -p ${PHPUNIT_COVERAGE_DIRECTORY} ${BEHAT_COVERAGE_DIRECTORY} ${REPORTS_DIRECTORY}
111111

112+
.PHONY: configure-dev-env
113+
configure-dev-env:
114+
npm install --global remark-cli remark-preset-lint-consistent remark-preset-lint-recommended remark-lint-list-item-indent
115+
116+
.PHONY: lint-markdown
117+
lint-markdown:
118+
npx remark . --output
119+
112120
.PHONY: build install configure test test-unit test-functional codestyle create-build-directories scrutinizer-behat scrutinizer-phpunit
113121
.DEFAULT: build

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

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

78
[![Scrutinizer Build Status](https://img.shields.io/scrutinizer/build/g/yoanm/php-jsonrpc-params-symfony-constraint-doc-sdk.svg?label=Scrutinizer\&logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/php-jsonrpc-params-symfony-constraint-doc-sdk/build-status/master)
89
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/yoanm/php-jsonrpc-params-symfony-constraint-doc-sdk/master.svg?logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/php-jsonrpc-params-symfony-constraint-doc-sdk/?branch=master)
@@ -21,9 +22,9 @@ See [yoanm/symfony-jsonrpc-params-sf-constraints-doc](https://github.com/yoanm/s
2122

2223
## Versions
2324

24-
* Symfony v3/4 PHP >=7.1 : `v0.x`
25-
* Symfony v4/5 PHP >=7.2 : `v1.0`
26-
* Symfony v4.4/5.4/6.x PHP ^8.0 : `v1.1`
25+
* Symfony v3/4 PHP >=7.1 : `v0.x`
26+
* Symfony v4/5 PHP >=7.2 : `v1.0`
27+
* Symfony v4.4/5.4/6.x PHP ^8.0 : `v1.1`
2728

2829
## How to use
2930

0 commit comments

Comments
 (0)