file-filters.yml 4.5 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: '**/*.[tj]{s,sx}'
  11. # Trigger for when we must run full lint (stylelint)
  12. lintable_css_in_js_rules_changed: &lintable_css_in_js_rules_changed
  13. - *sentry_specific_workflow
  14. - added|modified: '.github/file-filters.yml'
  15. - added|modified: 'yarn.lock'
  16. - added|deleted|modified: 'stylelint.*'
  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: &lintable_rules_changed
  23. - *sentry_specific_workflow
  24. - added|modified: '.github/file-filters.yml'
  25. - added|modified: 'package.json'
  26. - added|modified: 'yarn.lock'
  27. - added|deleted|modified: '.prettierignore'
  28. - added|deleted|modified: '.eslintignore'
  29. - added|deleted|modified: '.eslint*'
  30. # Provides list of changed files to test (jest)
  31. # getsentry/sentry does not use this directly, instead we shard tests inside jest.config.js
  32. testable_modified: &testable_modified
  33. - added|modified: 'package.json'
  34. - added|modified: 'static/**/*.[tj]{s,sx}'
  35. - *sentry_specific_test_files
  36. # Trigger for when we must run full tests (jest)
  37. testable_rules_changed: &testable_rules_changed
  38. - *sentry_specific_workflow
  39. - added|modified: '.github/file-filters.yml'
  40. - added|modified: 'jest.config.ts'
  41. # Trigger whether to run tsc or not
  42. # There's no "rules_changed" for this, because we run it for all files always
  43. # getsentry/sentry does not use this directly, instead frontend_all is a superset to trigger tsc
  44. typecheckable_rules_changed: &typecheckable_rules_changed
  45. - *sentry_specific_workflow
  46. - added|modified: '.github/file-filters.yml'
  47. - added|deleted|modified: '**/tsconfig*.json'
  48. - added|deleted|modified: 'static/**/*.[tj]{s,sx}'
  49. # Trigger to apply the 'Scope: Frontend' label to PRs
  50. frontend_all: &frontend_all
  51. - *lintable_css_in_js_rules_changed
  52. - *lintable_rules_changed
  53. - *testable_rules_changed
  54. - *typecheckable_rules_changed
  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_all
  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