Skip to content

Commit

Permalink
Merge pull request #3 from msmakouz/update-ci
Browse files Browse the repository at this point in the history
Updating GitHub actions, removing framework from deps
  • Loading branch information
butschster committed Sep 20, 2022
2 parents c1207a5 + b9bab0d commit 2ab8d1c
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 109 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on:
pull_request:
push:
branches:
- master

name: phpunit

jobs:
phpunit:
uses: spiral/gh-actions/.github/workflows/phpunit.yml@master
with:
os: >-
['ubuntu-latest']
php: >-
['8.1', '8.2']
stability: >-
['prefer-lowest', 'prefer-stable']
53 changes: 0 additions & 53 deletions .github/workflows/run-tests.yml

This file was deleted.

59 changes: 12 additions & 47 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,16 @@
name: run-tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
static-analysis:
name: Psalm
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
php: [ 8.1 ]
os: [ ubuntu-latest ]

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

- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}

- name: Validate Composer
run: composer validate

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Restore Composer Cache
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer
push:
branches:
- master

- name: Install Dependencies
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --prefer-dist --no-interaction --no-progress
name: static analysis

- name: Static Analysis
run: vendor/bin/psalm --no-cache
jobs:
psalm:
uses: spiral/gh-actions/.github/workflows/psalm.yml@master
with:
os: >-
['ubuntu-latest']
php: >-
['8.1']
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# Ignition bridge

[![PHP](https://img.shields.io/packagist/php-v/spiral-packages/ignition-bridge.svg?style=flat-square)](https://packagist.org/packages/spiral-packages/ignition-bridge)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/spiral-packages/ignition-bridge.svg?style=flat-square)](https://packagist.org/packages/spiral-packages/ignition-bridge)
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/spiral-packages/ignition-bridge/run-tests?label=tests&style=flat-square)](https://github.com/spiral-packages/ignition-bridge/actions?query=workflow%3Arun-tests+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/spiral-packages/ignition-bridge.svg?style=flat-square)](https://packagist.org/packages/spiral-packages/ignition-bridge)
[![PHP Version Require](https://poser.pugx.org/spiral-packages/ignition-bridge/require/php)](https://packagist.org/packages/spiral-packages/ignition-bridge)
[![Latest Stable Version](https://poser.pugx.org/spiral-packages/ignition-bridge/v/stable)](https://packagist.org/packages/spiral-packages/ignition-bridge)
[![phpunit](https://github.com/spiral-packages/ignition-bridge/actions/workflows/phpunit.yml/badge.svg)](https://github.com/spiral-packages/ignition-bridge/actions)
[![psalm](https://github.com/spiral-packages/ignition-bridge/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/spiral-packages/ignition-bridge/actions)
[![Codecov](https://codecov.io/gh/spiral-packages/ignition-bridge/branch/master/graph/badge.svg)](https://codecov.io/gh/spiral-packages/ignition-bridge)
[![Total Downloads](https://poser.pugx.org/spiral-packages/ignition-bridge/downloads)](https://packagist.org/packages/spiral-packages/ignition-bridge)
[![type-coverage](https://shepherd.dev/github/spiral-packages/ignition-bridge/coverage.svg)](https://shepherd.dev/github/spiral-packages/ignition-bridge)
[![psalm-level](https://shepherd.dev/github/spiral-packages/ignition-bridge/level.svg)](https://shepherd.dev/github/spiral-packages/ignition-bridge)

[Framework Bundle](https://github.com/spiral/framework)

## Requirements

Expand Down Expand Up @@ -31,7 +37,8 @@ protected const LOAD = [
];
```

> Note: if you are using [`spiral-packages/discoverer`](https://github.com/spiral-packages/discoverer),
> **Note**
> If you are using [`spiral-packages/discoverer`](https://github.com/spiral-packages/discoverer),
> you don't need to register bootloader by yourself.
## Testing
Expand Down Expand Up @@ -59,4 +66,4 @@ Please review [our security policy](../../security/policy) on how to report secu

## License

The MIT License (MIT). Please see [License File](LICENSE) for more information.
MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained by [Spiral Scout](https://spiralscout.com).
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
],
"require": {
"php": "^8.1",
"spatie/ignition": "^1.2",
"spiral/framework": "^3.0"
"spiral/boot": "^3.0",
"spiral/exceptions": "^3.0",
"spatie/ignition": "^1.2"
},
"require-dev": {
"mockery/mockery": "^1.5",
"phpunit/phpunit": "^9.5",
"phpunit/phpunit": "^9.5.24",
"vimeo/psalm": "^4.9",
"spiral/nyholm-bridge": "^1.2"
},
Expand Down
5 changes: 5 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,10 @@
<referencedClass name="JetBrains\PhpStorm\ExpectedValues" />
</errorLevel>
</UndefinedAttributeClass>
<UndefinedClass>
<errorLevel type="suppress">
<referencedClass name="Spiral\Bootloader\Http\ErrorHandlerBootloader" />
</errorLevel>
</UndefinedClass>
</issueHandlers>
</psalm>

0 comments on commit 2ab8d1c

Please sign in to comment.