Skip to content

Commit 4d3df16

Browse files
author
Илья
committed
Init sample linter
1 parent fc0a4de commit 4d3df16

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

.github/workflows/sumplelinter.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: linter
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [ main ]
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
linter:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
php-versions: [ '7.2' ]
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
name: Checkout
21+
22+
- uses: eWaterCycle/setup-grpc@v5
23+
name: Setup gRPC
24+
with:
25+
grpc-version: 1.51.1
26+
27+
- run: composer validate --strict
28+
name: Validate composer.json and composer.lock
29+
30+
- uses: actions/cache@v3
31+
name: Cache Composer packages
32+
id: composer-cache
33+
34+
with:
35+
path: vendor
36+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
37+
restore-keys: |
38+
${{ runner.os }}-php-
39+
- name: Install dependencies
40+
run: composer install --prefer-dist --no-progress
41+
42+
- name: Run tests
43+
run: ./vendor/bin/phplint \
44+
./ --exclude=vendor

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"psr/log": "^1|^2|^3"
2121
},
2222
"require-dev": {
23-
"phpunit/phpunit": ">= 6.0, <10.0"
23+
"phpunit/phpunit": ">= 6.0, <10.0",
24+
"overtrue/phplint": "^3.0"
2425
},
2526
"autoload": {
2627
"psr-4": {

0 commit comments

Comments
 (0)