Skip to content

Commit e12f7f8

Browse files
Add GitHub Actions CI workflow for PHP-only project
1 parent 424e625 commit e12f7f8

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: PHP CI Pipeline
2+
3+
# Trigger the workflow on push or pull request to the main branch
4+
on:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- main
11+
12+
# Jobs to run
13+
jobs:
14+
test:
15+
name: Run PHP Checks
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
# Check out the repository
20+
- name: Checkout code
21+
uses: actions/checkout@v3
22+
23+
# Set up PHP
24+
- name: Set up PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: '8.2' # Use the PHP version your project requires
28+
29+
# Lint PHP files (check for syntax errors)
30+
- name: Lint PHP files
31+
run: find . -type f -name '*.php' -exec php -l {} \;

0 commit comments

Comments
 (0)