file-filters.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # This is used by the action https://github.com/dorny/paths-filter
  2. # TODO: There are some meta files that we potentially could ignore for both front/backend,
  3. # as well as some configuration files that should trigger both
  4. frontend_components_lintable: &frontend_components_lintable
  5. - '**/*.[tj]{s,sx}'
  6. frontend_lintable: &frontend_lintable
  7. - *frontend_components_lintable
  8. - '**/tsconfig*.json'
  9. - '{package,now,vercel}.json'
  10. yarn_lockfile: &yarn_lockfile
  11. - 'yarn.lock'
  12. eslint_config: &eslint_config
  13. - '.eslint*'
  14. # `frontend_src` filters on files that are frontend changes excluding
  15. # changes to the tests/ directory.
  16. # If you want to filter on *all* frontend files, use the `frontend_all` filter.
  17. frontend_src: &frontend_src
  18. - *yarn_lockfile
  19. - *eslint_config
  20. - '!(tests)/**/*.[tj]{s,sx}'
  21. - '**/tsconfig*.json'
  22. - '{package,now,vercel}.json'
  23. - '**/*.less'
  24. - 'static/**'
  25. - 'fixtures/search-syntax/**/*'
  26. - '.github/workflows/frontend.yml'
  27. frontend_all: &frontend_all
  28. - *frontend_src
  29. - '**/*.[tj]{s,sx}'
  30. frontend_modified_lintable:
  31. - added|modified: *frontend_lintable
  32. frontend_components_modified_lintable:
  33. - added|modified: *frontend_components_lintable
  34. # Also used in `getsentry-dispatch.yml` to dispatch backend tests on getsentry
  35. backend_dependencies: &backend_dependencies
  36. - 'requirements-*.txt'
  37. backend_build_changes: &backend_build_changes
  38. # If you change this line make sure that workflows using this action (e.g. acceptance, api_docs)
  39. # *and* file-filters would be updated as well
  40. - '.github/actions/setup-sentry/action.yml'
  41. - '.github/workflows/backend.yml'
  42. - '.pre-commit-config.yaml'
  43. - 'Makefile'
  44. - 'pyproject.toml'
  45. # `backend_src` filters on files that are backend changes excluding
  46. # changes to the tests/ directory.
  47. # If you want to filter on *all* backend files, use the `backend_all` filter.
  48. backend_src: &backend_src
  49. - *backend_build_changes
  50. - *backend_dependencies
  51. - '!(tests)/**/*.py'
  52. - '**/*.sh'
  53. - '**/*.pysnap'
  54. - 'src/sentry/!(static)/**'
  55. - 'src/sentry_plugins/**/*.html'
  56. - 'migrations_lockfile.txt'
  57. - 'config/**/*'
  58. - 'fixtures/search-syntax/**/*'
  59. backend_all: &backend_all
  60. - *backend_src
  61. - '**/*.py'
  62. - '**/*.pyi'
  63. # This is the ultimate controller for acceptance.yml
  64. acceptance: &acceptance
  65. - *frontend_all
  66. - *backend_all
  67. # This is verbose because backend_build_changes includes it, however,
  68. - '.github/actions/setup-sentry/action.yml'
  69. - '.github/workflows/acceptance.yml'
  70. api_docs: &api_docs
  71. - *backend_all
  72. - 'api-docs/**'
  73. - 'tests/apidocs/**'
  74. # This is the ultimate controller for backend.yml
  75. backend_any_type: &backend_any_type
  76. - *backend_all
  77. - *api_docs
  78. migrations_added:
  79. - added: 'src/sentry/migrations/*'
  80. migrations_modified:
  81. - modified: 'src/sentry/migrations/*'
  82. # These files will trigger our wokrflow to check if lockfile
  83. # updates are needed
  84. migration_lockfile:
  85. - *backend_dependencies
  86. - '**/*.py'
  87. - .github/workflows/check-if-migration-is-required.yml
  88. - .github/workflows/scripts/migration-check.sh