codestyle.yml 785 B

123456789101112131415161718192021222324252627282930313233343536
  1. name: PaddleOCR Code Style Check
  2. on:
  3. pull_request:
  4. push:
  5. branches: ['main', 'release/*']
  6. jobs:
  7. check-code-style:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - uses: actions/checkout@v4
  11. with:
  12. ref: ${{ github.ref }}
  13. - uses: actions/setup-python@v5
  14. with:
  15. python-version: '3.10'
  16. - name: Cache Python dependencies
  17. uses: actions/cache@v4
  18. with:
  19. path: ~/.cache/pip
  20. key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
  21. restore-keys: |
  22. ${{ runner.os }}-pip-
  23. - name: Install Dependencies for Python
  24. run: |
  25. python -m pip install --upgrade pip
  26. pip install "clang-format==13.0.0"
  27. - uses: pre-commit/action@v3.0.1
  28. with:
  29. extra_args: '--all-files'