Skip to content

Commit

Permalink
WIP: splitted GA workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
uestla committed Apr 7, 2023
1 parent c97d6e6 commit 36bef98
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 5 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/php-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "PHP linter"

on: [push, pull_request]

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2]

fail-fast: false

name: PHP ${{matrix.php}}

steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none

- run: make phplint
23 changes: 23 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "PHPStan"

on: [push, pull_request]

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: [7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2]

fail-fast: false

name: PHP ${{matrix.php}}

steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none

- run: make phpstan
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml → .github/workflows/tester.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Tests"
name: "Nette Tester"

on: [push, pull_request]

Expand All @@ -22,5 +22,4 @@ jobs:
php-version: ${{ matrix.php }}
coverage: none

- run: make install
- run: make ci
- run: make tester
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ vendor: composer.json $(wildcard composer.lock)
@composer install

.PHONY: ci
ci: phplint tester ## Runs complete CI suite
ci: phplint phpstan tester ## Runs complete CI suite

.PHONY: phpstan
phpstan: install
@echo '> PHPStan ...'
@php vendor/bin/phpstan analyse --level=max Simplex/ tests/

.PHONY: phplint
phplint: install
phplint:
@echo '> PHP linter ...'
@php vendor/bin/parallel-lint Simplex/ tests/ --colors
@echo ''
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"require-dev": {
"php-parallel-lint/php-parallel-lint": "^1.3",
"php-parallel-lint/php-console-highlighter": "^1.0",
"phpstan/phpstan": ">=0.9.3",
"nette/tester": "@dev"
},
"autoload": {
Expand Down

0 comments on commit 36bef98

Please sign in to comment.