Skip to content

Commit b249680

Browse files
committed
add syntax checker workflow
1 parent 5be28f2 commit b249680

2 files changed

Lines changed: 36 additions & 3 deletions

File tree

.github/workflows/samples-php-client.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ on:
44
push:
55
paths:
66
- samples/client/petstore/php/OpenAPIClient-php/**
7-
- samples/client/petstore/php-nextgen/OpenAPIClient-php/**
87
pull_request:
98
paths:
109
- samples/client/petstore/php/OpenAPIClient-php/**
11-
- samples/client/petstore/php-nextgen/OpenAPIClient-php/**
1210
jobs:
1311
build:
1412
name: Build PHP projects
@@ -24,7 +22,6 @@ jobs:
2422
sample:
2523
# clients
2624
- samples/client/petstore/php/OpenAPIClient-php/
27-
- samples/client/petstore/php-nextgen/OpenAPIClient-php/
2825
services:
2926
petstore-api:
3027
image: swaggerapi/petstore
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Samples PHP Syntax Checker
2+
3+
on:
4+
push:
5+
paths:
6+
- samples/client/petstore/php/OpenAPIClient-php/**
7+
- samples/client/petstore/php-nextgen/OpenAPIClient-php/**
8+
pull_request:
9+
paths:
10+
- samples/client/petstore/php/OpenAPIClient-php/**
11+
- samples/client/petstore/php-nextgen/OpenAPIClient-php/**
12+
jobs:
13+
build:
14+
name: Build PHP projects
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
php:
20+
- "8.1"
21+
- "8.2"
22+
- "8.3"
23+
- "8.4"
24+
sample:
25+
# clients
26+
- samples/client/petstore/php/OpenAPIClient-php/
27+
- samples/client/petstore/php-nextgen/OpenAPIClient-php/
28+
steps:
29+
- uses: actions/checkout@v4
30+
- name: Setup PHP with tools
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
php-version: "${{ matrix.php }}"
34+
- name: php -l
35+
working-directory: ${{ matrix.sample }}
36+
run: find . -name "*.php" -exec php -l {} +

0 commit comments

Comments
 (0)