-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit ccb882b
Showing
51 changed files
with
10,292 additions
and
0 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,30 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 4 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
# TS/JS-Files | ||
[*.{ts,js}] | ||
indent_size = 2 | ||
|
||
# JSON-Files | ||
[*.json] | ||
indent_style = tab | ||
|
||
# YAML-Files | ||
[*.{yaml,yml}] | ||
indent_size = 2 | ||
|
||
# NEON-Files | ||
[*.neon] | ||
indent_size = 2 | ||
indent_style = tab |
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,12 @@ | ||
/.github export-ignore | ||
/tests export-ignore | ||
/.editorconfig export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.php-cs-fixer.php export-ignore | ||
/composer.lock export-ignore | ||
/CONTRIBUTING.md export-ignore | ||
/phpstan.neon export-ignore | ||
/phpunit.xml export-ignore | ||
/rector.php export-ignore | ||
/renovate.json export-ignore |
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,70 @@ | ||
name: Bug report | ||
description: Create a report to help improve this package. | ||
title: "[BUG]" | ||
labels: | ||
- bug | ||
body: | ||
- type: input | ||
id: php-version | ||
attributes: | ||
label: PHP version | ||
description: What PHP version are you using? | ||
placeholder: 'e.g. 8.1.8' | ||
validations: | ||
required: true | ||
- type: input | ||
id: composer-version | ||
attributes: | ||
label: Composer version | ||
description: What Composer version are you using? | ||
placeholder: 'e.g. 2.4.1' | ||
validations: | ||
required: true | ||
- type: input | ||
id: package-version | ||
attributes: | ||
label: Package version | ||
description: What version of this package are you using? | ||
placeholder: 'e.g. 1.0.0' | ||
validations: | ||
required: true | ||
- type: dropdown | ||
id: application | ||
attributes: | ||
label: Application | ||
description: On which platform did the error occur? | ||
options: | ||
- Composer | ||
- Phar | ||
- PHIVE | ||
validations: | ||
required: true | ||
- type: input | ||
id: operating-system | ||
attributes: | ||
label: Operating system | ||
description: What operating system are you using? | ||
placeholder: 'e.g. macOS 12.5.1' | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Current behavior | ||
description: A clear and concise description of what the bug is. | ||
- type: textarea | ||
attributes: | ||
label: Expected behavior | ||
description: A clear and concise description of what you expected to happen. | ||
- type: textarea | ||
attributes: | ||
label: Steps to reproduce | ||
description: If possible, describe steps to reproduce the behavior. | ||
placeholder: | | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
- type: textarea | ||
attributes: | ||
label: Additional context | ||
description: Add any other context about the problem here. |
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 @@ | ||
blank_issues_enabled: false |
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,29 @@ | ||
name: Feature request | ||
description: Suggest an idea for this project. | ||
title: "[FEATURE]" | ||
labels: | ||
- enhancement | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Is your feature request related to a problem? | ||
description: A clear and concise description of what the problem is. | ||
placeholder: I'm always frustrated when [...] | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Describe the solution you'd like | ||
description: A clear and concise description of what you want to happen. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Describe alternatives you've considered | ||
description: > | ||
A clear and concise description of any alternative solutions or features | ||
you've considered. | ||
- type: textarea | ||
attributes: | ||
label: Additional context | ||
description: Add any other context or screenshots about the feature request here. |
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,31 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- duplicate | ||
- 'good first issue' | ||
- 'help wanted' | ||
- invalid | ||
- question | ||
- wontfix | ||
categories: | ||
- title: ⚡ Breaking | ||
labels: | ||
- breaking | ||
- title: 🚀 Improved | ||
labels: | ||
- enhancement | ||
- title: 🚑 Fixed | ||
labels: | ||
- bug | ||
- title: 👷 Changed | ||
labels: | ||
- maintenance | ||
- title: 📖 Documentation | ||
labels: | ||
- documentation | ||
- title: ⚙️ Dependencies | ||
labels: | ||
- dependencies | ||
- title: Other changes | ||
labels: | ||
- "*" |
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,59 @@ | ||
name: CGL | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
cgl: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Prepare environment | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
# @todo Switch to PHP 8.4 once PHP-CS-Fixer supports it | ||
php-version: 8.3 | ||
tools: composer:v2, composer-require-checker, composer-unused, cs2pr | ||
coverage: none | ||
|
||
# Validation | ||
- name: Validate composer.json | ||
run: composer validate | ||
|
||
# Install dependencies | ||
- name: Install Composer dependencies | ||
run: composer require --no-progress symfony/config:"^5.4 || ^6.0 || ^7.0" symfony/dependency-injection:"^5.4 || ^6.0 || ^7.0" symfony/yaml:"^5.4 || ^6.0 || ^7.0" | ||
|
||
# Check Composer dependencies | ||
- name: Check dependencies | ||
run: composer-require-checker check | ||
- name: Reset composer.json | ||
run: git checkout composer.json composer.lock | ||
- name: Re-install Composer dependencies | ||
uses: ramsey/composer-install@v3 | ||
- name: Check for unused dependencies | ||
run: composer-unused | ||
|
||
# Linting | ||
- name: Lint composer.json | ||
run: composer lint:composer | ||
- name: Lint Editorconfig | ||
run: composer lint:editorconfig | ||
- name: Lint PHP | ||
run: composer lint:php -- --format=checkstyle | cs2pr | ||
|
||
# SCA | ||
- name: SCA PHP | ||
run: composer sca:php -- --error-format github | ||
|
||
# Migration | ||
- name: Rector migration | ||
run: composer migration:rector -- --dry-run |
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,28 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
release: | ||
name: Create release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Check if tag is valid | ||
- name: Check tag | ||
run: | | ||
if ! [[ ${{ github.ref }} =~ ^refs/tags/[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$ ]]; then | ||
exit 1 | ||
fi | ||
# Create release | ||
- name: Create release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
token: ${{ secrets.RELEASE_TOKEN }} | ||
generateReleaseNotes: 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,111 @@ | ||
name: Tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
tests: | ||
name: Tests (PHP ${{ matrix.php-version }} & ${{ matrix.dependencies }} dependencies) | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: ["8.1", "8.2", "8.3", "8.4"] | ||
dependencies: ["highest", "lowest"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Prepare environment | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
tools: composer:v${{ matrix.composer-version }} | ||
coverage: none | ||
|
||
# Install dependencies | ||
- name: Install Composer dependencies | ||
uses: ramsey/composer-install@v3 | ||
with: | ||
dependency-versions: ${{ matrix.dependencies }} | ||
|
||
# Run tests | ||
- name: Run tests | ||
run: composer test | ||
|
||
coverage: | ||
name: Test coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Prepare environment | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.4 | ||
tools: composer:v2 | ||
coverage: pcov | ||
|
||
# Install dependencies | ||
- name: Install Composer dependencies | ||
uses: ramsey/composer-install@v3 | ||
with: | ||
dependency-versions: highest | ||
|
||
# Run Unit tests | ||
- name: Build coverage directory | ||
run: mkdir -p .build/coverage | ||
- name: Run Unit tests with coverage | ||
run: composer test:coverage | ||
|
||
# Upload artifact | ||
- name: Fix coverage path | ||
working-directory: .build/coverage | ||
run: sed -i 's#/home/runner/work/monitoring/monitoring#${{ github.workspace }}#g' clover.xml | ||
- name: Upload coverage artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage | ||
path: .build/coverage/clover.xml | ||
retention-days: 7 | ||
|
||
coverage-report: | ||
name: Report test coverage | ||
runs-on: ubuntu-latest | ||
needs: coverage | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Download artifact | ||
- name: Download coverage artifact | ||
id: download | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: coverage | ||
|
||
# CodeClimate | ||
- name: CodeClimate report | ||
uses: paambaati/codeclimate-action@v9.0.0 | ||
if: env.CC_TEST_REPORTER_ID | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
with: | ||
coverageLocations: | | ||
${{ steps.download.outputs.download-path }}/clover.xml:clover | ||
# Coveralls | ||
- name: Coveralls report | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
file: ${{ steps.download.outputs.download-path }}/clover.xml |
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,4 @@ | ||
/.build | ||
/vendor | ||
/.php-cs-fixer.cache | ||
/.phpunit.result.cache |
Oops, something went wrong.