file-filters.yml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. # This is used by the action https://github.com/dorny/paths-filter
  2. sentry_specific_workflow: &sentry_specific_workflow
  3. - added|modified: '.github/workflows/frontend.yml'
  4. sentry_specific_test_files: &sentry_specific_test_files
  5. - added|modified: 'tests/js/**/*'
  6. - added|deleted|modified: 'fixtures/search-syntax/**/*'
  7. - added|deleted|modified: 'fixtures/js-stubs/**/*'
  8. # Provides list of changed app files to lint against (stylelint)
  9. lintable_css_in_js_modified: &lintable_css_in_js_modified
  10. - added|modified: 'static/**/*.[tj]{s,sx}'
  11. # Trigger for when we must run full lint (stylelint)
  12. lintable_css_in_js_rules_changed:
  13. - added|modified: '.github/file-filters.yml'
  14. - added|modified: 'yarn.lock'
  15. - added|deleted|modified: 'stylelint.*'
  16. - *lintable_css_in_js_modified
  17. # Provides list of changed files to lint against (eslint)
  18. lintable_modified: &lintable_modified
  19. - added|modified: '**/*.[tj]{s,sx}'
  20. - added|modified: '**/*.{html,less,json,yml,md}'
  21. # Trigger for when we must run full lint (eslint)
  22. lintable_rules_changed:
  23. - added|modified: '.github/file-filters.yml'
  24. - added|modified: 'yarn.lock'
  25. - added|deleted|modified: '.eslint*'
  26. - *lintable_modified
  27. # Provides list of changed files to test (jest)
  28. # getsentry/sentry does not use this directly, instead we shard tests inside jest.config.js
  29. testable_and_modified: &testable_and_modified
  30. - added|modified: 'package.json'
  31. - added|modified: 'static/**/*.[tj]{s,sx}'
  32. - *sentry_specific_test_files
  33. # Trigger for when we must run full tests (jest)
  34. testable_rules_changed:
  35. - added|modified: '.github/file-filters.yml'
  36. - added|modified: 'jest.config.ts'
  37. - *testable_and_modified
  38. # Trigger whether to run tsc or not
  39. # There's no "rules_changed" for this, because we run it for all files always
  40. # getsentry/sentry does not use this directly, instead frontend_src is a superset to trigger tsc
  41. typecheckable:
  42. - added|modified: '.github/file-filters.yml'
  43. - added|deleted|modified: '**/tsconfig*.json'
  44. - added|deleted|modified: 'static/**/*.[tj]{s,sx}'
  45. - *sentry_specific_test_files
  46. # Trigger to apply the 'Scope: Frontend' label to PRs
  47. frontend_src: &frontend_src
  48. - added|modified: 'package.json'
  49. - added|modified: 'yarn.lock'
  50. - added|modified: 'stylelint.*'
  51. - added|modified: '.eslint*'
  52. - added|modified: 'jest.config.ts'
  53. - added|modified: '**/tsconfig*.json'
  54. - added|modified: 'static/**' # Broader than *frontend_components_lintable, accept anything in static/
  55. - added|modified: '{.volta,vercel}.json'
  56. - *sentry_specific_workflow
  57. - *sentry_specific_test_files
  58. # Also used in `getsentry-dispatch.yml` to dispatch backend tests on getsentry
  59. backend_dependencies: &backend_dependencies
  60. - 'requirements-*.txt'
  61. backend_build_changes: &backend_build_changes
  62. # If you change this line make sure that workflows using this action (e.g. acceptance, api_docs)
  63. # *and* file-filters would be updated as well
  64. - '.github/actions/setup-sentry/action.yml'
  65. - '.github/workflows/backend.yml'
  66. - '.pre-commit-config.yaml'
  67. - 'Makefile'
  68. - 'pyproject.toml'
  69. # `backend_src` filters on files that are backend changes excluding
  70. # changes to the tests/ directory.
  71. # If you want to filter on *all* backend files, use the `backend_all` filter.
  72. backend_src: &backend_src
  73. - *backend_build_changes
  74. - *backend_dependencies
  75. - '!(tests)/**/*.py'
  76. - '**/*.sh'
  77. - '**/*.pysnap'
  78. - 'src/sentry/!(static)/**'
  79. - 'src/sentry_plugins/**/*.html'
  80. - 'migrations_lockfile.txt'
  81. - 'config/**/*'
  82. - 'fixtures/search-syntax/**/*'
  83. backend_all: &backend_all
  84. - *backend_src
  85. - '**/*.py'
  86. - '**/*.pyi'
  87. # This is the ultimate controller for acceptance.yml
  88. acceptance: &acceptance
  89. - *frontend_src
  90. - *backend_all
  91. # This is verbose because backend_build_changes includes it, however,
  92. - '.github/actions/setup-sentry/action.yml'
  93. - '.github/workflows/acceptance.yml'
  94. api_docs: &api_docs
  95. - *backend_all
  96. - 'api-docs/**'
  97. - 'tests/apidocs/**'
  98. # This is the ultimate controller for backend.yml
  99. backend_any_type: &backend_any_type
  100. - *backend_all
  101. - *api_docs
  102. migrations_added:
  103. - added:
  104. - 'src/sentry/migrations/*'
  105. - 'src/sentry/feedback/migrations/*'
  106. - 'src/sentry/hybridcloud/migrations/*'
  107. - 'src/sentry/replays/migrations/*'
  108. # These files will trigger our workflow to check if lockfile
  109. # updates are needed
  110. migration_lockfile:
  111. - *backend_dependencies
  112. - '**/*.py'
  113. - .github/workflows/check-if-migration-is-required.yml
  114. - .github/workflows/scripts/migration-check.sh