Skip to content

Commit 6bfee2a

Browse files
f3l1xfelixure
andauthored
Update & maintenance (#43)
* CI: use reusable workflows, add workflow_dispatch trigger * Tests: use contributte/tester, apply code style fixes * Config: use contributte/qa and phpstan, add ruleset.xml * Composer: use contributte packages, add autoload-dev * chore: apply code style fixes * Composer: upgrade minimal versions of deps for PHP 8.2+ * chore: drop Latte 2 support --------- Co-authored-by: Contributte AI <ai@f3l1x.io>
1 parent 7062851 commit 6bfee2a

54 files changed

Lines changed: 512 additions & 421 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ indent_style = tab
1111
indent_size = tab
1212
tab_width = 4
1313

14-
[{*.json, *.yaml, *.yml, *.md}]
14+
[*.{json,yaml,yml,md}]
1515
indent_style = space
1616
indent_size = 2

.gitattributes

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
.github export-ignore
2-
tests/ export-ignore
1+
.docs export-ignore
2+
.editorconfig export-ignore
33
.gitattributes export-ignore
44
.gitignore export-ignore
5-
.travis.yml export-ignore
5+
.github export-ignore
6+
Makefile export-ignore
67
phpstan.neon export-ignore
7-
ecs.php export-ignore
8-
*.php diff=php
8+
ruleset.xml export-ignore
9+
tests export-ignore

.github/.kodiak.toml

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

.github/workflows/codesniffer.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: "Codesniffer"
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
push:
8+
branches: ["*"]
9+
10+
schedule:
11+
- cron: "0 8 * * 1"
12+
13+
jobs:
14+
codesniffer:
15+
name: "Codesniffer"
16+
uses: contributte/.github/.github/workflows/codesniffer.yml@master
17+
with:
18+
php: "8.2"

.github/workflows/coverage.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: "Coverage"
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
push:
8+
branches: ["*"]
9+
10+
schedule:
11+
- cron: "0 9 * * 1"
12+
13+
jobs:
14+
coverage:
15+
name: "Nette Tester"
16+
uses: contributte/.github/.github/workflows/nette-tester-coverage-v2.yml@master
17+
with:
18+
php: "8.2"

.github/workflows/main.yml

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

.github/workflows/phpstan.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: "Phpstan"
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
push:
8+
branches: ["*"]
9+
10+
schedule:
11+
- cron: "0 10 * * 1"
12+
13+
jobs:
14+
phpstan:
15+
name: "Phpstan"
16+
uses: contributte/.github/.github/workflows/phpstan.yml@master
17+
with:
18+
php: "8.2"

.github/workflows/tests.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "Nette Tester"
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
push:
8+
branches: ["*"]
9+
10+
schedule:
11+
- cron: "0 10 * * 1"
12+
13+
jobs:
14+
test85:
15+
name: "Nette Tester"
16+
uses: contributte/.github/.github/workflows/nette-tester.yml@master
17+
with:
18+
php: "8.5"
19+
20+
test84:
21+
name: "Nette Tester"
22+
uses: contributte/.github/.github/workflows/nette-tester.yml@master
23+
with:
24+
php: "8.4"
25+
26+
test83:
27+
name: "Nette Tester"
28+
uses: contributte/.github/.github/workflows/nette-tester.yml@master
29+
with:
30+
php: "8.3"
31+
32+
test82:
33+
name: "Nette Tester"
34+
uses: contributte/.github/.github/workflows/nette-tester.yml@master
35+
with:
36+
php: "8.2"
37+
38+
testlower:
39+
name: "Nette Tester"
40+
uses: contributte/.github/.github/workflows/nette-tester.yml@master
41+
with:
42+
php: "8.2"
43+
composer: "composer update --no-interaction --no-progress --prefer-dist --prefer-stable --prefer-lowest"

.gitignore

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
tests/**/output/*.actual
2-
tests/**/output/*.expected
3-
vendor/
4-
composer.lock
5-
coverage.*
1+
# IDE
2+
/.idea
3+
4+
# Composer
5+
/vendor
6+
/composer.lock
7+
8+
# Tests
9+
/tests/tmp
10+
/coverage.*
11+
/tests/**/*.log
12+
/tests/**/*.html
13+
/tests/**/*.expected
14+
/tests/**/*.actual

Makefile

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
1-
.PHONY: install qa cs csf phpstan tests coverage-clover coverage-html
2-
1+
.PHONY: install
32
install:
43
composer update
54

5+
.PHONY: qa
66
qa: phpstan cs
77

8+
.PHONY: cs
89
cs:
9-
vendor/bin/ecs check src tests
10+
ifdef GITHUB_ACTION
11+
vendor/bin/phpcs --standard=ruleset.xml -q --report=checkstyle --extensions="php,phpt" src tests | cs2pr
12+
else
13+
vendor/bin/phpcs --standard=ruleset.xml --extensions="php,phpt" src tests
14+
endif
1015

16+
.PHONY: csf
1117
csf:
12-
vendor/bin/ecs check src tests --fix
18+
vendor/bin/phpcbf --standard=ruleset.xml --extensions="php,phpt" src tests
1319

20+
.PHONY: phpstan
1421
phpstan:
15-
vendor/bin/phpstan analyze -l 8 src
22+
vendor/bin/phpstan analyze -c phpstan.neon
1623

24+
.PHONY: tests
1725
tests:
1826
vendor/bin/tester -C tests
1927

20-
coverage-clover:
28+
.PHONY: coverage
29+
coverage:
30+
ifdef GITHUB_ACTION
2131
vendor/bin/tester -C --coverage coverage.xml --coverage-src src tests
22-
23-
coverage-html:
24-
vendor/bin/tester -C --coverage coverage.hzml --coverage-src src tests
32+
else
33+
vendor/bin/tester -C --coverage coverage.html --coverage-src src tests
34+
endif

0 commit comments

Comments
 (0)