diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml new file mode 100644 index 0000000..62e594b --- /dev/null +++ b/.github/workflows/pr-checks.yml @@ -0,0 +1,52 @@ +name: PR Checks + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +permissions: + contents: read + +env: + PYTHON_VERSION: "3.14" + +jobs: + check-linting: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: ${{ env.PYTHON_VERSION }} + cache: pip + + - name: Install Ruff + run: | + python -m pip install --upgrade pip + pip install ruff + + - name: Ruff + run: ruff check main.py core utils + + check-types: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: ${{ env.PYTHON_VERSION }} + cache: pip + + - name: Install Black + run: | + python -m pip install --upgrade pip + pip install black + + - name: Black + run: black --check main.py core utils