Skip to content

Commit

Permalink
CI: new workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
f3l1x committed Dec 29, 2021
1 parent 1e0805d commit 571c344
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 286 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:
build:
name: "Codesniffer"
uses: contributte/.github/.github/workflows/codesniffer.yml@master
269 changes: 0 additions & 269 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:
build:
name: "Phpstan"
uses: contributte/.github/.github/workflows/phpstan.yml@master
41 changes: 41 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Nette Tester"

on:
pull_request:

push:
branches: ["*"]

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

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

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

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

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

build72:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@master
with:
php: "7.2"
36 changes: 19 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
.PHONY: qa lint cs csf phpstan tests coverage
.PHONY: install qa cs csf phpstan tests coverage

all:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs
install:
composer update

vendor: composer.json composer.lock
composer install
qa: phpstan cs

qa: lint phpstan cs

lint: vendor
vendor/bin/linter src tests

cs: vendor
cs:
ifdef GITHUB_ACTION
vendor/bin/codesniffer -q --report=checkstyle src tests | cs2pr
else
vendor/bin/codesniffer src tests
endif

csf: vendor
csf:
vendor/bin/codefixer src tests

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

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

coverage: vendor
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.xml --coverage-src ./src tests
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

0 comments on commit 571c344

Please sign in to comment.