Skip to content

Commit

Permalink
Maintenance: github actions, makefile, git ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
f3l1x committed Feb 23, 2024
1 parent 60fb5f7 commit 8c4ae37
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 70 deletions.
7 changes: 3 additions & 4 deletions .gitattributes
@@ -1,11 +1,10 @@
# Not archived
.docs export-ignore
tests export-ignore
.github export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
Makefile export-ignore
phpstan.neon export-ignore
README.md export-ignore
phpstan.neon export-ignore
ruleset.xml export-ignore
tests export-ignore
19 changes: 11 additions & 8 deletions .github/workflows/codesniffer.yml
@@ -1,15 +1,18 @@
name: "Codesniffer"

on:
pull_request:
pull_request:
workflow_dispatch:

push:
branches: ["*"]
push:
branches: [ "*" ]

schedule:
- cron: "0 8 * * 1"
schedule:
- cron: "0 8 * * 1"

jobs:
codesniffer:
name: "Codesniffer"
uses: contributte/.github/.github/workflows/codesniffer.yml@v1
codesniffer:
name: "Codesniffer"
uses: contributte/.github/.github/workflows/codesniffer.yml@master
with:
php: "8.2"
19 changes: 11 additions & 8 deletions .github/workflows/coverage.yml
@@ -1,15 +1,18 @@
name: "Coverage"

on:
pull_request:
pull_request:
workflow_dispatch:

push:
branches: ["*"]
push:
branches: [ "*" ]

schedule:
- cron: "0 8 * * 1"
schedule:
- cron: "0 8 * * 1"

jobs:
coverage:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester-coverage.yml@v1
coverage:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester-coverage-v2.yml@master
with:
php: "8.2"
19 changes: 11 additions & 8 deletions .github/workflows/phpstan.yml
@@ -1,15 +1,18 @@
name: "Phpstan"

on:
pull_request:
pull_request:
workflow_dispatch:

push:
branches: ["*"]
push:
branches: [ "*" ]

schedule:
- cron: "0 8 * * 1"
schedule:
- cron: "0 8 * * 1"

jobs:
phpstan:
name: "Phpstan"
uses: contributte/.github/.github/workflows/phpstan.yml@v1
phpstan:
name: "Phpstan"
uses: contributte/.github/.github/workflows/phpstan.yml@master
with:
php: "8.2"
43 changes: 22 additions & 21 deletions .github/workflows/tests.yml
@@ -1,30 +1,31 @@
name: "Nette Tester"

on:
pull_request:
pull_request:
workflow_dispatch:

push:
branches: ["*"]
push:
branches: [ "*" ]

schedule:
- cron: "0 8 * * 1"
schedule:
- cron: "0 8 * * 1"

jobs:
test82:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@v1
with:
php: "8.2"
test83:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@master
with:
php: "8.3"

test81:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@v1
with:
php: "8.1"
test82:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@master
with:
php: "8.2"

test80:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@v1
with:
php: "8.0"
composer: "composer update --no-interaction --no-progress --prefer-dist --prefer-stable --prefer-lowest"
test81:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@master
with:
php: "8.1"
composer: "composer update --no-interaction --no-progress --prefer-dist --prefer-stable --prefer-lowest"
7 changes: 6 additions & 1 deletion .gitignore
Expand Up @@ -6,4 +6,9 @@
/composer.lock

# Tests
/coverage.xml
/tests/tmp
/coverage.*
/tests/**/*.log
/tests/**/*.html
/tests/**/*.expected
/tests/**/*.actual
11 changes: 8 additions & 3 deletions Makefile
@@ -1,26 +1,31 @@
.PHONY: install qa cs csf phpstan tests coverage

.PHONY: install
install:
composer update

.PHONY: qa
qa: phpstan cs

.PHONY: cs
cs:
ifdef GITHUB_ACTION
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp -q --report=checkstyle src tests | cs2pr
else
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests
endif

.PHONY: csf
csf:
vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --colors -nsp src tests
vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests

.PHONY: phpstan
phpstan:
vendor/bin/phpstan analyse -c phpstan.neon

.PHONY: tests
tests:
vendor/bin/tester -s -p php --colors 1 -C tests/Cases

.PHONY: coverage
coverage:
ifdef GITHUB_ACTION
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.xml --coverage-src src tests/Cases
Expand Down
3 changes: 0 additions & 3 deletions phpstan.neon
Expand Up @@ -15,7 +15,4 @@ parameters:
- src
- .docs

excludePaths:
- src/DI/SentryExtension24.php

ignoreErrors:
4 changes: 0 additions & 4 deletions tests/.coveralls.yml

This file was deleted.

10 changes: 0 additions & 10 deletions tests/.gitignore

This file was deleted.

0 comments on commit 8c4ae37

Please sign in to comment.