Skip to content

Commit

Permalink
Set up Github Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
aldemeery committed Oct 26, 2024
1 parent 4e76e92 commit e93eb8d
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 41 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Tests
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

-
name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'

-
name: Validate composer.json and composer.lock
run: composer validate --strict

-
name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
-
name: Install dependencies
run: composer install --prefer-dist --no-progress

-
name: Run test suite
run: composer run-script test
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# 🧅 Onion: A Layering Mechanism for PHP Applications

<p>
<a href="https://github.com/aldemeery/onion/actions"><img src="https://github.com/aldemeery/onion/actions/workflows/tests.yml/badge.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/aldemeery/onion"><img src="https://img.shields.io/packagist/dt/aldemeery/onion?label=Downloads" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/aldemeery/onion"><img src="https://img.shields.io/packagist/v/aldemeery/onion?label=Latest+Version"" alt="Latest Version"></a>
<a href="https://github.com/aldemeery/onion/blob/master/LICENSE"><img src="https://img.shields.io/packagist/l/aldemeery/onion?label=License"" alt="License"></a>
</p>

Onion is a lightweight PHP package designed to facilitate layered processing within applications, It provides a clean and efficient way to stack layers of functionality, allowing developers to create flexible and reusable components that can be easily composed and managed.
Each layer can perform a specific operation on the data being passed through, making it simple to build complex workflows while maintaining clear separation of concerns.

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": "^8.1"
"php": "^8.2"
},
"require-dev": {
"infection/infection": "^0.29.0",
Expand Down
80 changes: 40 additions & 40 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e93eb8d

Please sign in to comment.