Skip to content

Commit dbe352b

Browse files
committed
Fix coding standard test + use default Nette CS test
1 parent da8bcee commit dbe352b

File tree

3 files changed

+38
-14
lines changed

3 files changed

+38
-14
lines changed

.github/workflows/coding-style.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Coding Style
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
nette_cc:
7+
name: Nette Code Checker
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: shivammathur/setup-php@v2
12+
with:
13+
php-version: 7.4
14+
coverage: none
15+
16+
- run: composer create-project nette/code-checker temp/code-checker ^3 --no-progress
17+
- run: php temp/code-checker/code-checker --strict-types --no-progress
18+
19+
nette_cs:
20+
name: Nette Coding Standard
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: 8.0
27+
coverage: none
28+
29+
- run: composer create-project nette/coding-standard temp/coding-standard ^3 --no-progress --ignore-platform-reqs
30+
- run: php temp/coding-standard/ecs check src

.github/workflows/main.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@ name: Integrity check
22

33
on:
44
push:
5-
branches:
5+
branches:
66
- master
77
pull_request:
8-
branches:
9-
- master
8+
types: [ assigned, opened, synchronize, reopened ]
9+
schedule:
10+
- cron: '1 * * * *'
1011

1112
jobs:
1213
build:
1314
runs-on: ubuntu-latest
1415

1516
steps:
1617
- uses: actions/checkout@master
17-
18+
1819
- name: Install PHP
1920
uses: shivammathur/setup-php@master
2021
with:
@@ -28,14 +29,8 @@ jobs:
2829
# Install app deps
2930
composer install --no-interaction --prefer-dist
3031
31-
# Check code checker and coding standards
32-
- name: Check coding standards
33-
run: |
34-
php temp/code-checker/code-checker --short-arrays --strict-types --fix --no-progress
35-
php temp/coding-standard/ecs check src --config temp/coding-standard/coding-standard-php71.yml
32+
- name: The PHP Security Checker
33+
uses: symfonycorp/security-checker-action@v2
3634

3735
- name: Check PHPStan rules
3836
run: composer phpstan
39-
40-
- name: Run tests
41-
run: tests/test.sh

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
"require-dev": {
2020
"phpstan/phpstan": "^0.12.18",
2121
"tracy/tracy": "^2.7",
22-
"phpstan/phpstan-nette": "^0.12.6",
23-
"symplify/easy-coding-standard": "^7.2"
22+
"phpstan/phpstan-nette": "^0.12.6"
2423
},
2524
"autoload": {
2625
"classmap": [

0 commit comments

Comments
 (0)