Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚨 Add CI and GitHub templates #2

Merged
merged 3 commits into from
May 28, 2024
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
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: bug

---

## Describe the bug

A clear and concise description of what the bug is.

## Reproduction

Steps to reproduce the behavior.

## Expected behavior

A clear and concise description of what you expected to happen.

## Actual behavior

Describe the behavior as it is right now.

## Additional information

Anything else you want to provide.
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: feature

---

## Goal

A clear and concise description of what the problem is. Ex. I think this could be easier when...

## Additional information

Add any other context or screenshots about the feature request here.
3 changes: 3 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changes

Provide a summary of your changes.
74 changes: 74 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: ReCaptcha package CI

on: [ push ]

jobs:
static:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ '8.1', '8.2', '8.3' ]

name: Static analysis PHP ${{ matrix.php-versions }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl

- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-progress

- name: Execute static analysis
run: |
composer analyse

test:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ '8.1', '8.2', '8.3' ]

name: Tests PHP ${{ matrix.php-versions }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl

- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-suggest --no-progress

- name: Execute tests via PHPUnit
run: composer test:no-coverage

style-pint:
runs-on: ubuntu-latest
name: Code style - Pint

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: mbstring, intl

- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-suggest --no-progress

- name: Check code standards
run: |
composer pint:check
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ vendor
.phpunit.cache
build
.idea
composer.lock
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@
},
"scripts": {
"pint:fix": "vendor/bin/pint",
"pint:check": "vendor/bin/pint --test",
"analyse": "vendor/bin/phpstan analyse",
"test": "vendor/bin/phpunit"
"test": "vendor/bin/phpunit",
"test:no-coverage": "vendor/bin/phpunit --no-coverage"
},
"extra": {
"laravel": {
Expand Down
Loading