Skip to content

Commit ab9e255

Browse files
Merge pull request #2 from Muawiya-contact/add-syntax-check
Add GitHub Action for Python syntax validation
2 parents 9cf4076 + 5fc87a8 commit ab9e255

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/syntax-check.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Python Syntax Check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main # or your default branch
7+
8+
jobs:
9+
syntax-check:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
22+
- name: Check Python syntax
23+
run: |
24+
find . -name "*.py" -print0 | xargs -0 -n1 python -m py_compile

SearchEngine.zip

6.39 KB
Binary file not shown.

0 commit comments

Comments
 (0)