From 406fbc9dbc94211b0ea4e814da2e8ac1f72ef111 Mon Sep 17 00:00:00 2001 From: "Marcus W." Date: Tue, 29 Jul 2025 18:02:25 +0300 Subject: [PATCH] Add PR syntax validation workflow --- .github/workflows/syntax-check.yml | 27 +++++++++++++++++++++++++++ .gitignore | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 .github/workflows/syntax-check.yml create mode 100644 .gitignore diff --git a/.github/workflows/syntax-check.yml b/.github/workflows/syntax-check.yml new file mode 100644 index 0000000..4826f25 --- /dev/null +++ b/.github/workflows/syntax-check.yml @@ -0,0 +1,27 @@ +name: Syntax Checks + +on: + pull_request: + paths: + - '**.py' + - '**.md' + - '.github/workflows/**' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Compile Python files + run: | + python -m py_compile $(git ls-files '*.py') + - name: Install markdownlint + run: | + npm install -g markdownlint-cli + - name: Lint Markdown files + run: | + markdownlint '**/*.md' diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7a60b85 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +__pycache__/ +*.pyc