Skip to content

Commit

Permalink
Merge pull request #1 from young-steveo/young-steveo-php-github-workflow
Browse files Browse the repository at this point in the history
Create php.yml
  • Loading branch information
young-steveo committed Jun 1, 2023
2 parents 1f742a6 + 3ad8abe commit 5ac8c1a
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: PHP Composer

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup 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:
php-version: 8.2
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
run: composer run check
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Arcanum

A CQRS Backend for PHP.
A CQRS Backend for PHP.

Currently there is only a container implementation.
2 changes: 1 addition & 1 deletion tests/Cabinet/Stub/UnknownService.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Arcanum\Test\Cabinet\Stub\DoesNotExist;

class SimpleService
class UnknownService
{
public function __construct(public DoesNotExist $dependency) /** @phpstan-ignore-line */
{
Expand Down

0 comments on commit 5ac8c1a

Please sign in to comment.