file-filters.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. # This is used by the action https://github.com/dorny/paths-filter (which we have forked to https://github.com/getsentry/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. - 'docs-ui/**'
  25. - 'static/**'
  26. - 'fixtures/search-syntax/**/*'
  27. - '.github/workflows/frontend.yml'
  28. frontend_all: &frontend_all
  29. - *frontend_src
  30. - '**/*.[tj]{s,sx}'
  31. frontend_modified_lintable:
  32. - added|modified: *frontend_lintable
  33. frontend_components_modified_lintable:
  34. - added|modified: *frontend_components_lintable
  35. # Also used in `getsentry-dispatch.yml` to dispatch backend tests on getsentry
  36. backend_dependencies: &backend_dependencies
  37. - 'requirements-*.txt'
  38. backend_build_changes: &backend_build_changes
  39. # If you change this line make sure that workflows using this action (e.g. acceptance, api_docs)
  40. # *and* file-filters would be updated as well
  41. - '.github/actions/setup-sentry/action.yml'
  42. - '.github/workflows/backend.yml'
  43. - '.pre-commit-config.yaml'
  44. - 'Makefile'
  45. - 'pyproject.toml'
  46. # `backend_src` filters on files that are backend changes excluding
  47. # changes to the tests/ directory.
  48. # If you want to filter on *all* backend files, use the `backend_all` filter.
  49. backend_src: &backend_src
  50. - *backend_build_changes
  51. - *backend_dependencies
  52. - '!(tests)/**/*.py'
  53. - '**/*.sh'
  54. - '**/*.pysnap'
  55. - 'src/sentry/!(static)/**'
  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. - *backend_all
  66. - *frontend_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. plugins: &plugins
  71. - *backend_all
  72. - 'src/sentry_plugins/**/*.html'
  73. api_docs: &api_docs
  74. - *backend_all
  75. - 'api-docs/**'
  76. - 'tests/apidocs/**'
  77. # This is the ultimate controller for backend.yml
  78. backend_any_type: &backend_any_type
  79. - *backend_all
  80. - *api_docs
  81. - *plugins
  82. migrations_added:
  83. - added: 'src/sentry/migrations/*'
  84. migrations_modified:
  85. - modified: 'src/sentry/migrations/*'
  86. # These files will trigger our wokrflow to check if lockfile
  87. # updates are needed
  88. migration_lockfile:
  89. - *backend_dependencies
  90. - '**/*.py'
  91. - .github/workflows/check-if-migration-is-required.yml
  92. - .github/workflows/scripts/migration-check.sh