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