From 5540fccdb5f3d2701517669c556e572703db4bfe Mon Sep 17 00:00:00 2001 From: Miljan Ilic Date: Thu, 7 Mar 2024 22:57:15 +0100 Subject: [PATCH] Add GitHub Specific Configuration --- .github/ISSUE_TEMPLATE/bug_report.md | 30 ++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 24 +++++++++++ .github/ISSUE_TEMPLATE/question.md | 17 ++++++++ .github/pull_request_template.md | 13 ++++++ .github/workflows/php-ci.yaml | 50 +++++++++++++++++++++++ 5 files changed, 134 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/question.md create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/php-ci.yaml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..e57976b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,30 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "[BUG]" +labels: '' +assignees: IlicMiljan + +--- + +### Describe the bug +A clear and concise description of what the bug is. + +### Steps to Reproduce +Please provide a code snippet or explicit steps that reproduce the behavior: +1. Code snippet '...' +2. Running function '...' +3. See error + +### Expected behavior +A clear and concise description of what you expected to happen. + +### Environment (please complete the following information): +- RetryMaster version: [e.g. 1.0.0] +- PHP version: [e.g. 8.0] + +### Actual Output / Stack Trace +If applicable, add the actual output or stack trace received to help explain your problem. + +### Additional context +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..67bc28d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,24 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "[FEATURE]" +labels: '' +assignees: IlicMiljan + +--- + +### Is your feature request related to a problem? Please describe. + +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +### Describe the solution you'd like + +A clear and concise description of what you want to happen. + +### Describe alternatives you've considered + +A clear and concise description of any alternative solutions or features you've considered. + +### Additional context + +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 0000000..157a348 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,17 @@ +--- +name: Question +about: Ask questions about this project +title: "[QUESTION]" +labels: '' +assignees: IlicMiljan + +--- + +### Please describe your question +A clear and concise description of your question. Please make sure to include as much information as possible. + +### What have you tried so far? +Please describe what you have tried in order to answer your question. + +### Additional context +Add any other context or screenshots about your question here. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..59ad0f2 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,13 @@ +### Description of Changes +Briefly describe the changes you've made. + +### Related Issue +If applicable, reference the issue that this PR addresses. + +### How Has This Been Tested? +Briefly describe how you tested your changes. + +### Checklist +Please confirm the following: +- [ ] I have tested my changes and corrected any errors. +- [ ] I have documented my changes if necessary. diff --git a/.github/workflows/php-ci.yaml b/.github/workflows/php-ci.yaml new file mode 100644 index 0000000..38e9381 --- /dev/null +++ b/.github/workflows/php-ci.yaml @@ -0,0 +1,50 @@ +name: PHP CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + name: PHP CI + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php-version: [ '8.0' ] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + tools: composer:v2, phpunit + extensions: mbstring + coverage: xdebug + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Install Dependencies + run: composer update --prefer-dist --no-progress + + - name: Run Unit Tests with PHPUnit + run: ./vendor/bin/phpunit --coverage-clover ./coverage.xml + + - name: Check Code Style with PHP_CodeSniffer + run: ./vendor/bin/phpcs --standard=./phpcs.xml + + - name: Static Analysis with PHPStan + run: ./vendor/bin/phpstan analyse -c phpstan.neon + + - name: Upload Coverage Reports to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage.xml + verbose: true