formatting.yml 883 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. name: Formatting
  2. on:
  3. pull_request:
  4. branches:
  5. '**'
  6. merge_group:
  7. branches: [ master ]
  8. schedule:
  9. - cron: "0 0 * * *"
  10. concurrency:
  11. group: ${{ github.workflow }}-${{ github.ref }}
  12. cancel-in-progress: true
  13. jobs:
  14. # formatting and basic install on cpu-only machine
  15. unit-tests:
  16. runs-on: ubuntu-20.04
  17. steps:
  18. - uses: actions/checkout@v3
  19. - name: environment
  20. run: |
  21. which python
  22. python --version
  23. - name: Install dependencies
  24. run: |
  25. # Previously we would do pip install .[dev] but this is causing out of
  26. # space errors start with torch 2.1.0 release
  27. grep -E "clang-format|pre-commit" requirements/requirements-dev.txt | xargs pip install
  28. - name: Formatting checks
  29. run: |
  30. pip show pre-commit clang-format
  31. pre-commit run --all-files