pcdshub / pre-commit-hooks

Pre-commit hooks for PCDS projects (https://pre-commit.com/)
Other
10 stars 7 forks source link

Investigate continuous integration #4

Closed klauer closed 4 years ago

klauer commented 4 years ago

https://pre-commit.com/#usage-in-continuous-integration

My original thought, not necessarily how we should do it, given the above documentation:

matrix:
  include:
    name: pre-commit checks
    python: 3.7
    env:
      PRE_COMMIT=1

script:
    - |
      if [ "$PRE_COMMIT" ]; then
        pip install pre-commit
        pre-commit install
        pre-commit run --all-files  # or whatever it is
        exit $?  #  exit with pre-commits return code
      fi

Likely this should be part of pcds-ci-helpers. x-ref an issue there: https://github.com/pcdshub/pcds-ci-helpers/issues/12

ZLLentz commented 4 years ago

Closing this by the linked PR