Skip to content

Commit

Permalink
fix: Prettify codebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Aug 28, 2022
1 parent b62dc69 commit 170749b
Show file tree
Hide file tree
Showing 16 changed files with 182 additions and 210 deletions.
20 changes: 10 additions & 10 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

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

## Our Responsibilities

Expand Down
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# CONTRIBUTING

We're using [GitHub Actions](https://docs.github.com/en/actions) as a continuous integration system.
For details, see the workflows in [.github/workflows](../.github/workflows).

For details, see the workflows in [.github/workflows](../.github/workflows).

## Tests

We're using [`grumphp/grumphp`](https://github.com/phpro/grumphp) to drive the development.
Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
## Steps required to reproduce the problem

1.
2.
3.
1.
2.
3.

## Expected Result

*
-

## Actual Result

*
-
14 changes: 7 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
This PR:

* [ ] Fix ...
* [ ] Provide ...
* [ ] It breaks backward compatibility
* [ ] Has unit tests (phpspec)
* [ ] Has static analysis tests (psalm, phpstan)
* [ ] Has documentation
* [ ] Is an experimental thing
- [ ] Fix ...
- [ ] Provide ...
- [ ] It breaks backward compatibility
- [ ] Has unit tests (phpspec)
- [ ] Has static analysis tests (psalm, phpstan)
- [ ] Has documentation
- [ ] Is an experimental thing

Follows #.
Related to #.
Expand Down
20 changes: 10 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
6 changes: 3 additions & 3 deletions .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ daysUntilClose: 7
staleLabel: stale

markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
6 changes: 3 additions & 3 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ jobs:

- name: Clear vendor files
run: |
rm -rf vendor composer.lock
rm -rf vendor composer.lock
- name: Checkout
uses: actions/checkout@v3
with:
clean: false
fetch-depth: 1
clean: false
fetch-depth: 1

- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
Expand Down
21 changes: 6 additions & 15 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

on:
push:
paths:
- "**.php"
branches:
- main
pull_request:
paths:
- "**.php"

name: "Code style"

Expand All @@ -26,29 +30,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Install PHP
uses: shivammathur/setup-php@2.18.1
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: gd,mbstring,pcov
tools: cs2pr

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
uses: ramsey/composer-install@v2

- name: Run Grumphp
run: vendor/bin/grumphp run --testsuite=cs -n
Expand Down
33 changes: 13 additions & 20 deletions .github/workflows/mutation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

on:
push:
paths:
- "src/**.php"
- "tests/**.php"
branches:
- main
pull_request:
paths:
- "src/**.php"
- "tests/**.php"

name: "Mutations testing"

Expand All @@ -26,36 +32,23 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Install PHP
uses: shivammathur/setup-php@2.18.1
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: gd,mbstring,pcov

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
coverage: pcov
extensions: gd,mbstring

- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
uses: ramsey/composer-install@v2

- name: Run Grumphp
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
run: XDEBUG_MODE=coverage vendor/bin/grumphp run --tasks=infection -n
run: vendor/bin/grumphp run --tasks=infection -n

- name: Send feedback on Github
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
if: ${{ failure() }}
run: |
XDEBUG_MODE=coverage vendor/bin/infection -j2 --logger-github
vendor/bin/infection -j2 --logger-github
44 changes: 22 additions & 22 deletions .github/workflows/prune.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@
name: "Prune"

on: # yamllint disable-line rule:truthy
schedule:
- cron: "0 12 * * *"
schedule:
- cron: "0 12 * * *"

env:
DAYS_BEFORE_CLOSE: 5
DAYS_BEFORE_STALE: 5
DAYS_BEFORE_CLOSE: 5
DAYS_BEFORE_STALE: 5

jobs:
prune:
name: "Issues"
prune:
name: "Issues"

runs-on: "ubuntu-latest"
runs-on: "ubuntu-latest"

steps:
- name: "Prune issues and pull requests"
uses: "actions/stale@v5"
with:
days-before-close: "${{ env.DAYS_BEFORE_CLOSE }}"
days-before-stale: "${{ env.DAYS_BEFORE_STALE }}"
repo-token: "${{ secrets.GITHUB_TOKEN }}"
stale-issue-label: "stale"
stale-issue-message: |
Since this issue has not had any activity within the last ${{ env.DAYS_BEFORE_STALE }} days, I have marked it as stale.
I will close it if no further activity occurs within the next ${{ env.DAYS_BEFORE_CLOSE }} days.
stale-pr-label: "stale"
stale-pr-message: |
Since this pull request has not had any activity within the last ${{ env.DAYS_BEFORE_STALE }} days, I have marked it as stale.
I will close it if no further activity occurs within the next ${{ env.DAYS_BEFORE_CLOSE }} days.
steps:
- name: "Prune issues and pull requests"
uses: "actions/stale@v5"
with:
days-before-close: "${{ env.DAYS_BEFORE_CLOSE }}"
days-before-stale: "${{ env.DAYS_BEFORE_STALE }}"
repo-token: "${{ secrets.GITHUB_TOKEN }}"
stale-issue-label: "stale"
stale-issue-message: |
Since this issue has not had any activity within the last ${{ env.DAYS_BEFORE_STALE }} days, I have marked it as stale.
I will close it if no further activity occurs within the next ${{ env.DAYS_BEFORE_CLOSE }} days.
stale-pr-label: "stale"
stale-pr-message: |
Since this pull request has not had any activity within the last ${{ env.DAYS_BEFORE_STALE }} days, I have marked it as stale.
I will close it if no further activity occurs within the next ${{ env.DAYS_BEFORE_CLOSE }} days.
74 changes: 37 additions & 37 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,42 @@
name: "Release"

on: # yamllint disable-line rule:truthy
push:
tags:
- "**"
push:
tags:
- "**"

jobs:
release:
name: "Tag"

runs-on: "ubuntu-latest"

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Determine tag
id: tag_name
run: |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/}
shell: bash

- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md

- name: "Create release"
uses: "actions/[email protected]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
release_name: "${{ steps.tag_name.outputs.current_version }}"
tag_name: "${{ steps.tag_name.outputs.current_version }}"
body: ${{ steps.changelog_reader.outputs.changes }}
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
release:
name: "Tag"

runs-on: "ubuntu-latest"

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Determine tag
id: tag_name
run: |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/}
shell: bash

- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md

- name: "Create release"
uses: "actions/[email protected]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
release_name: "${{ steps.tag_name.outputs.current_version }}"
tag_name: "${{ steps.tag_name.outputs.current_version }}"
body: ${{ steps.changelog_reader.outputs.changes }}
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
Loading

0 comments on commit 170749b

Please sign in to comment.