hoang.nguyen6
deploy
f66643d unverified
Raw
History Blame Contribute Delete
991 Bytes
name: CI
on:
pull_request:
push:
branches: [main, develop, feature/*]
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
# πŸ” Lint with Ruff
- name: Lint with Ruff
run: ruff check pdf2zh test
# 🎨 Format check with Black
- name: Check formatting with Black
run: black --check pdf2zh test
# πŸ§ͺ Run tests
- name: Run pytest
run: pytest test/ -v