linter.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. ---
  2. name: Lint Code Base
  3. defaults:
  4. run:
  5. # To load bashrc
  6. shell: bash -ieo pipefail {0}
  7. on:
  8. pull_request:
  9. branches: [master, dev]
  10. schedule:
  11. # run CI every day even if no PRs/merges occur
  12. - cron: '0 12 * * *'
  13. jobs:
  14. build:
  15. name: Lint Code Base
  16. runs-on: ubuntu-latest
  17. steps:
  18. - name: Checkout Code
  19. uses: actions/[email protected]
  20. - name: Set up Python 3.6
  21. uses: actions/[email protected]
  22. with:
  23. python-version: 3.6
  24. - name: Install dependencies
  25. run: |
  26. pip install .
  27. pip install deepdiff numpy
  28. mkdir -p .github/linters
  29. cp pyproject.toml .github/linters
  30. - name: Pylint
  31. uses: docker://github/super-linter:v3
  32. if: always()
  33. env:
  34. # run linter on everything to catch preexisting problems
  35. VALIDATE_ALL_CODEBASE: true
  36. DEFAULT_BRANCH: master
  37. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  38. # Run only pylint
  39. VALIDATE_PYTHON: true
  40. VALIDATE_PYTHON_PYLINT: true
  41. PYTHON_PYLINT_CONFIG_FILE: pyproject.toml
  42. - name: Black
  43. uses: docker://github/super-linter:v3
  44. if: always()
  45. env:
  46. # run linter on everything to catch preexisting problems
  47. VALIDATE_ALL_CODEBASE: true
  48. DEFAULT_BRANCH: master
  49. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  50. # Run only black
  51. VALIDATE_PYTHON_BLACK: true
  52. PYTHON_BLACK_CONFIG_FILE: pyproject.toml
  53. - name: Lint everything else
  54. uses: docker://github/super-linter:v3
  55. if: always()
  56. env:
  57. # run linter on everything to catch preexisting problems
  58. VALIDATE_ALL_CODEBASE: true
  59. DEFAULT_BRANCH: master
  60. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  61. # Always false
  62. VALIDATE_PYTHON: false
  63. VALIDATE_PYTHON_PYLINT: false
  64. VALIDATE_PYTHON_BLACK: false
  65. VALIDATE_PYTHON_ISORT: false
  66. # Always false
  67. VALIDATE_JSON: false
  68. VALIDATE_JAVASCRIPT_STANDARD: false
  69. VALIDATE_PYTHON_FLAKE8: false
  70. VALIDATE_DOCKERFILE: false
  71. VALIDATE_DOCKERFILE_HADOLINT: false
  72. VALIDATE_EDITORCONFIG: false
  73. SHELLCHECK_OPTS: "-e SC1090"