-
Notifications
You must be signed in to change notification settings - Fork 24
71 lines (52 loc) · 1.72 KB
/
tests.yml
File metadata and controls
71 lines (52 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
on:
push:
branches: [ master ]
workflow_dispatch:
name: tests
jobs:
tests:
name: PHP-${{ matrix.php }}-${{ matrix.os }}
env:
extensions: json, pdo
tag: hleb2-php${{ matrix.php }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
php:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
steps:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
ini-values: date.timezone='UTC'
coverage: none
tools: composer:v2
- name: Check PHP
run: php -v
- name: Install framework
run: composer create-project phphleb/hleb ./${{ env.tag }}
- name: Framework version
run: php ./${{ env.tag }}/console --version
- name: Install tests
run: cd ./${{ env.tag }} && composer require phphleb/tests
- name: Install phpstan
run: cd ./${{ env.tag }} && composer require phpstan/phpstan
- name: Run phpstan
run: php ./${{ env.tag }}/vendor/bin/phpstan analyse --configuration=./${{ env.tag }}/vendor/phphleb/framework/phpstan.neon
- name: Set strict mode
run: php ./${{ env.tag }}/console reverse-strict-mode-feature --set
- name: Code reduction check
run: php ./${{ env.tag }}/console clearing-comment-feature
- name: Check autoloader
run: php ./${{ env.tag }}/console autoloader-support-feature
- name: Run tests
run: php ./${{ env.tag }}/vendor/phphleb/test-o/run ./vendor/phphleb/tests/