Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
odan committed Jul 12, 2024
1 parent 99a1353 commit 7aa829d
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 104 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: build

on: [ push, pull_request ]

jobs:
build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ ubuntu-latest ]
php-versions: [ 7.4, 8.0, 8.1, 8.2, 8.3 ]
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}

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

- name: Set up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run test suite
run: composer test:all
35 changes: 0 additions & 35 deletions .github/workflows/tests.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

[![Latest Version on Packagist](https://img.shields.io/github/release/slimphp/php-view.svg)](https://packagist.org/packages/slim/PHP-View)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE.md)
[![Build Status](https://github.com/slimphp/PHP-View/actions/workflows/tests.yml/badge.svg?branch=3.x)](https://github.com/slimphp/PHP-View/actions)
[![Build Status](https://github.com/slimphp/PHP-View/actions/workflows/build.yml/badge.svg?branch=3.x)](https://github.com/slimphp/PHP-View/actions)
[![Total Downloads](https://img.shields.io/packagist/dt/slim/PHP-View.svg)](https://packagist.org/packages/slim/PHP-View/stats)


Expand Down
102 changes: 53 additions & 49 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,56 @@
{
"name": "slim/php-view",
"type": "library",
"description": "Render PHP view scripts into a PSR-7 Response object.",
"keywords": [
"slim",
"framework",
"view",
"template",
"php",
"phtml",
"renderer"
],
"license": "MIT",
"authors": [
{
"name": "Glenn Eggleton",
"email": "[email protected]"
}
],
"require": {
"php": "^7.4 || ^8.0",
"psr/http-message": "^1.1"
},
"require-dev": {
"phpunit/phpunit": "^9.6",
"slim/psr7": "^1.6",
"squizlabs/php_codesniffer": "^3.10"
},
"autoload": {
"psr-4": {
"Slim\\Views\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Slim\\Tests\\": "tests"
}
},
"scripts": {
"test": [
"@phpcs",
"@phpunit"
],
"phpunit": "phpunit",
"phpcs": "phpcs",
"test:coverage": "phpunit --configuration phpunit.xml.dist --coverage-clover build/logs/clover.xml --coverage-html build/coverage"
},
"config": {
"sort-packages": true
"name": "slim/php-view",
"description": "Render PHP view scripts into a PSR-7 Response object.",
"license": "MIT",
"type": "library",
"keywords": [
"slim",
"framework",
"view",
"template",
"php",
"phtml",
"renderer"
],
"authors": [
{
"name": "Glenn Eggleton",
"email": "[email protected]"
}
],
"require": {
"php": "^7.4 || ^8.0",
"psr/http-message": "^1.1"
},
"require-dev": {
"phpstan/phpstan": "^1",
"phpunit/phpunit": "^9",
"slim/psr7": "^1.6",
"squizlabs/php_codesniffer": "^3.10"
},
"autoload": {
"psr-4": {
"Slim\\Views\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Slim\\Tests\\": "tests"
}
},
"config": {
"sort-packages": true
},
"scripts": {
"sniffer:check": "phpcs --standard=phpcs.xml",
"sniffer:fix": "phpcbf --standard=phpcs.xml",
"stan": "phpstan analyse -c phpstan.neon --no-progress --ansi",
"test": "phpunit --configuration phpunit.xml --do-not-cache-result --colors=always",
"test:all": [
"@sniffer:check",
"@stan",
"@test"
],
"test:coverage": "php -d xdebug.mode=coverage -r \\\"require 'vendor/bin/phpunit';\\\" -- --configuration phpunit.xml --do-not-cache-result --colors=always --coverage-clover build/logs/clover.xml --coverage-html build/coverage"
}
}
4 changes: 4 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
parameters:
level: 5
paths:
- src
19 changes: 0 additions & 19 deletions phpunit.xml.dist

This file was deleted.

0 comments on commit 7aa829d

Please sign in to comment.