Skip to content

Commit

Permalink
Skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
a-bashtannik committed Sep 28, 2024
1 parent 6424c88 commit b3daa0c
Show file tree
Hide file tree
Showing 23 changed files with 8,876 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2

updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
62 changes: 62 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Unit Tests

on:
pull_request:
push:
branches:
- master

jobs:
unit-tests:
name: Run Unit Tests
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
php: [8.2]
dependency-version: [prefer-stable]

steps:
# Check out the repository code
- name: Checkout
uses: actions/checkout@v4

# Set up the desired PHP version with extensions and coverage
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, mbstring, zip
coverage: pcov

# Determine the Composer cache directory
- name: Get Composer cache directory
id: composer-cache
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV

# Cache both the Composer cache directory and the vendor directory
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: |
${{ env.COMPOSER_CACHE_DIR }}
vendor
key: php-${{ matrix.php }}-deps-${{ hashFiles('composer.json', 'composer.lock') }}
restore-keys: |
php-${{ matrix.php }}-deps-
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run Rector (Dry Run)
run: composer test:refactor

- name: Run Lint Tests
run: composer test:lint

- name: Run PHPStan
run: composer test:types

- name: Run Pest Tests
run: composer test:unit
32 changes: 32 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Update Changelog

on:
release:
types: [published]

permissions:
contents: write

jobs:
update-changelog:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: master

- name: Update Changelog
uses: stefanzweifel/changelog-updater-action@v1
with:
latest-version: ${{ github.event.release.name }}
release-notes: ${{ github.event.release.body }}

- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: master
commit_message: Update CHANGELOG
file_pattern: CHANGELOG.md
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor/
/.idea/
.phpunit.result.cache
.DS_Store
81 changes: 81 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Changelog

All notable changes to `laravel package skeleton` will be documented in this file

## v1.2.2 - 2024-06-16

**Full Changelog**: https://github.com/algoyounes/laravel-package-skeleton/compare/v1.2.1...v1.2.2

## v1.2.1 - 2024-06-16

**Full Changelog**: https://github.com/algoyounes/laravel-package-skeleton/compare/v1.2.0...v1.2.1

## v1.2.0 - 2024-06-16

### What's Changed

* Feat: Implement automated changelog updates by @algoyounes in https://github.com/algoyounes/laravel-package-skeleton/pull/7

**Full Changelog**: https://github.com/algoyounes/laravel-package-skeleton/compare/v1.1.2...v1.2.0

## v1.1.1 - 2024-06-12

**What's Changed:**

- **Tweak:** add helpers file for utility functions

**Full Changelog:** [v1.1.0...v1.1.1](https://github.com/your-repository/compare/v1.1.0...v1.1.1)


---

## v1.1.0 - 2024-06-11

**What's Changed:**

- **Feat:** Update build tools and configurations by [@algoyounes](https://github.com/algoyounes) in [#6](https://github.com/your-repository/pull/6)

**Full Changelog:** [v1.0.4...v1.1.0](https://github.com/your-repository/compare/v1.0.4...v1.1.0)


---

## v1.0.4 - 2024-06-11

**Full Changelog:** [v1.0.3...v1.0.4](https://github.com/your-repository/compare/v1.0.3...v1.0.4)


---

## v1.0.3 - 2024-05-15

**What's Changed:**

- **Feat:** Add git hooks for automation by [@algoyounes](https://github.com/algoyounes) in [#5](https://github.com/your-repository/pull/5)

**Full Changelog:** [v1.0.1...v1.0.3](https://github.com/your-repository/compare/v1.0.1...v1.0.3)

**Contributors:**

- [@algoyounes](https://github.com/algoyounes)


---

## v1.0.1 - 2024-05-08

**What's Changed:**

- **FEAT:** init PHP skeleton package by [@algoyounes](https://github.com/algoyounes) in [#1](https://github.com/your-repository/pull/1)
- **PATCH:** Composer > Update package name by [@algoyounes](https://github.com/algoyounes) in [#2](https://github.com/your-repository/pull/2)
- **feat:** Upgrade PHP to version 8.2 by [@algoyounes](https://github.com/algoyounes) in [#3](https://github.com/your-repository/pull/3)
- **Update:** GitHub Actions Workflow for Unit Tests by [@algoyounes](https://github.com/algoyounes) in [#4](https://github.com/your-repository/pull/4)

**Full Changelog:** [v1.0.0...v1.0.1](https://github.com/your-repository/compare/v1.0.0...v1.0.1)


---

## 1.0.0 - 2024-05-08

- initial release
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Algo Younes

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions assets/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
Binary file added assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
96 changes: 96 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"name": "algoyounes/laravel-package-skeleton",
"description": "Laravel Package Skeleton for streamlined package development",
"keywords": [
"laravel",
"package",
"skeleton",
"skeleton-package",
"laravel package",
"laravel package skeleton",
"package skeleton",
"package development"
],
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Younes ENHARI",
"email": "algoyounes@gmail.com"
}
],
"autoload": {
"psr-4": {
"AlgoYounes\\Skeleton\\": "src/"
},
"files": [
"./helpers.php"
]
},
"autoload-dev": {
"psr-4": {
"AlgoYounes\\Skeleton\\Tests\\": "tests"
}
},
"require": {
"php": "^8.2"
},
"suggest": {
"illuminate/support": "for the Laravel integration",
"illuminate/contracts": "for the Laravel integration"
},
"require-dev": {
"laravel/framework": "^11.0",
"laravel/pint": "^1.13.7",
"pestphp/pest": "^2.28.1",
"phpstan/phpstan": "1.10.56",
"rector/rector": "0.19.5"
},
"scripts": {
"refactor": "rector",
"test:refactor": "rector --dry-run",
"test:types": "phpstan analyse --ansi",
"test:unit": "pest --colors=always",
"test:lint": "pint --test",
"test": [
"@test:refactor",
"@test:lint",
"@test:types",
"@test:unit"
],
"fix:lint": "pint --preset laravel",
"fix:refactor": "rector",
"fix": [
"@fix:refactor",
"@fix:lint"
],
"hook": [
"@hook:pre-commit",
"@hook:pre-push"
],
"hook:install": [
"ln -sf $PWD/hooks/pre-commit .git/hooks/pre-commit",
"chmod +x .git/hooks/pre-commit",
"ln -sf $PWD/hooks/pre-push .git/hooks/pre-push",
"chmod +x .git/hooks/pre-push"
],
"hook:pre-commit": [
"hooks/pre-commit"
],
"hook:pre-push": [
"hooks/pre-push"
],
"post-install-cmd": [
"@hook:install"
]
},
"config": {
"sort-packages": true,
"preferred-install": "dist",
"allow-plugins": {
"pestphp/pest-plugin": true
}
},
"minimum-stability": "stable",
"prefer-stable": true
}
Loading

0 comments on commit b3daa0c

Please sign in to comment.