Skip to content

Commit 7aa829d

Browse files
committed
Update build
1 parent 99a1353 commit 7aa829d

File tree

6 files changed

+86
-104
lines changed

6 files changed

+86
-104
lines changed

.github/workflows/build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: build
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.operating-system }}
8+
strategy:
9+
matrix:
10+
operating-system: [ ubuntu-latest ]
11+
php-versions: [ 7.4, 8.0, 8.1, 8.2, 8.3 ]
12+
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: Set up PHP ${{ matrix.php }}
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: ${{ matrix.php }}
22+
coverage: xdebug
23+
24+
- name: Install dependencies
25+
run: composer install --prefer-dist --no-progress --no-suggest
26+
27+
- name: Run test suite
28+
run: composer test:all

.github/workflows/tests.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

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

77

composer.json

Lines changed: 53 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,56 @@
11
{
2-
"name": "slim/php-view",
3-
"type": "library",
4-
"description": "Render PHP view scripts into a PSR-7 Response object.",
5-
"keywords": [
6-
"slim",
7-
"framework",
8-
"view",
9-
"template",
10-
"php",
11-
"phtml",
12-
"renderer"
13-
],
14-
"license": "MIT",
15-
"authors": [
16-
{
17-
"name": "Glenn Eggleton",
18-
"email": "geggleto@gmail.com"
19-
}
20-
],
21-
"require": {
22-
"php": "^7.4 || ^8.0",
23-
"psr/http-message": "^1.1"
24-
},
25-
"require-dev": {
26-
"phpunit/phpunit": "^9.6",
27-
"slim/psr7": "^1.6",
28-
"squizlabs/php_codesniffer": "^3.10"
29-
},
30-
"autoload": {
31-
"psr-4": {
32-
"Slim\\Views\\": "src"
33-
}
34-
},
35-
"autoload-dev": {
36-
"psr-4": {
37-
"Slim\\Tests\\": "tests"
38-
}
39-
},
40-
"scripts": {
41-
"test": [
42-
"@phpcs",
43-
"@phpunit"
44-
],
45-
"phpunit": "phpunit",
46-
"phpcs": "phpcs",
47-
"test:coverage": "phpunit --configuration phpunit.xml.dist --coverage-clover build/logs/clover.xml --coverage-html build/coverage"
48-
},
49-
"config": {
50-
"sort-packages": true
2+
"name": "slim/php-view",
3+
"description": "Render PHP view scripts into a PSR-7 Response object.",
4+
"license": "MIT",
5+
"type": "library",
6+
"keywords": [
7+
"slim",
8+
"framework",
9+
"view",
10+
"template",
11+
"php",
12+
"phtml",
13+
"renderer"
14+
],
15+
"authors": [
16+
{
17+
"name": "Glenn Eggleton",
18+
"email": "geggleto@gmail.com"
19+
}
20+
],
21+
"require": {
22+
"php": "^7.4 || ^8.0",
23+
"psr/http-message": "^1.1"
24+
},
25+
"require-dev": {
26+
"phpstan/phpstan": "^1",
27+
"phpunit/phpunit": "^9",
28+
"slim/psr7": "^1.6",
29+
"squizlabs/php_codesniffer": "^3.10"
30+
},
31+
"autoload": {
32+
"psr-4": {
33+
"Slim\\Views\\": "src"
5134
}
35+
},
36+
"autoload-dev": {
37+
"psr-4": {
38+
"Slim\\Tests\\": "tests"
39+
}
40+
},
41+
"config": {
42+
"sort-packages": true
43+
},
44+
"scripts": {
45+
"sniffer:check": "phpcs --standard=phpcs.xml",
46+
"sniffer:fix": "phpcbf --standard=phpcs.xml",
47+
"stan": "phpstan analyse -c phpstan.neon --no-progress --ansi",
48+
"test": "phpunit --configuration phpunit.xml --do-not-cache-result --colors=always",
49+
"test:all": [
50+
"@sniffer:check",
51+
"@stan",
52+
"@test"
53+
],
54+
"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"
55+
}
5256
}

phpstan.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parameters:
2+
level: 5
3+
paths:
4+
- src

phpunit.xml.dist

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)