Skip to content

Commit

Permalink
GitHub Actions: use re-usable workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Ondráček <ondracek.roman@centrum.cz>
Roman3349 authored and f3l1x committed Oct 27, 2022

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent 978ff8c commit 15ae45b
Showing 7 changed files with 99 additions and 301 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/codesniffer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Codesniffer"

on:
pull_request:

push:
branches: ["*"]

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

jobs:
codesniffer:
name: "Codesniffer"
uses: contributte/.github/.github/workflows/codesniffer.yml@v1
15 changes: 15 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Coverage"

on:
pull_request:

push:
branches: ["*"]

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

jobs:
test80:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester-coverage.yml@v1
291 changes: 0 additions & 291 deletions .github/workflows/main.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "PHPStan"

on:
pull_request:

push:
branches: ["*"]

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

jobs:
phpstan:
name: "PHPStan"
uses: contributte/.github/.github/workflows/phpstan.yml@v1
42 changes: 42 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Nette Tester"

on:
pull_request:

push:
branches: ["*"]

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

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

test80:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@v1
with:
php: "8.0"

test74:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@v1
with:
php: "7.4"

test73:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@v1
with:
php: "7.3"

test72:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@v1
with:
php: "7.2"
composer: "composer update --no-interaction --no-progress --prefer-dist --prefer-stable --prefer-lowest"
17 changes: 9 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: install qa cs csf phpstan tests coverage-clover coverage-html
.PHONY: install qa cs csf phpstan tests coverage

install:
composer update
@@ -7,7 +7,7 @@ qa: phpstan cs

cs:
ifdef GITHUB_ACTION
vendor/bin/codesniffer -q --report=checkstyle src tests | cs2pr
vendor/bin/codesniffer -q --report=checkstyle src tests | cs2pr
else
vendor/bin/codesniffer src tests
endif
@@ -16,13 +16,14 @@ csf:
vendor/bin/codefixer src tests

phpstan:
vendor/bin/phpstan analyse -l max -c phpstan.neon src
vendor/bin/phpstan analyse -c phpstan.neon

tests:
vendor/bin/tester -s -p php --colors 1 -C tests/cases

coverage-clover:
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.xml --coverage-src ./src tests/cases

coverage-html:
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.html --coverage-src ./src tests/cases
coverage:
ifdef GITHUB_ACTION
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.xml --coverage-src src tests/cases
else
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.html --coverage-src src tests/cases
endif
5 changes: 3 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -5,5 +5,6 @@ includes:
- vendor/phpstan/phpstan-strict-rules/rules.neon

parameters:
ignoreErrors:
- '#^Method Contributte\\Monolog\\Tracy\\LazyTracyLogger\:\:log\(\) has parameter (\$priority|\$value) with no typehint specified\.$#'
level: 9
paths:
- src

0 comments on commit 15ae45b

Please sign in to comment.