file-filters.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. - '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. - 'migrations_lockfile.txt'
  56. - 'config/**/*'
  57. - 'fixtures/search-syntax/**/*'
  58. backend_all: &backend_all
  59. - *backend_src
  60. - '**/*.py'
  61. - '**/*.pyi'
  62. # This is the ultimate controller for acceptance.yml
  63. acceptance: &acceptance
  64. - *frontend_all
  65. - *backend_all
  66. # This is verbose because backend_build_changes includes it, however,
  67. - '.github/actions/setup-sentry/action.yml'
  68. - '.github/workflows/acceptance.yml'
  69. plugins: &plugins
  70. - *backend_all
  71. - 'src/sentry_plugins/**/*.html'
  72. api_docs: &api_docs
  73. - *backend_all
  74. - 'api-docs/**'
  75. - 'tests/apidocs/**'
  76. # This is the ultimate controller for backend.yml
  77. backend_any_type: &backend_any_type
  78. - *backend_all
  79. - *api_docs
  80. - *plugins
  81. migrations_added:
  82. - added: 'src/sentry/migrations/*'
  83. migrations_modified:
  84. - modified: 'src/sentry/migrations/*'
  85. # These files will trigger our wokrflow to check if lockfile
  86. # updates are needed
  87. migration_lockfile:
  88. - *backend_dependencies
  89. - '**/*.py'
  90. - .github/workflows/check-if-migration-is-required.yml
  91. - .github/workflows/scripts/migration-check.sh