file-filters.yml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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: '**/*.{less,json,yml}'
  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. - added|modified: '**/*.md'
  57. - *sentry_specific_workflow
  58. - *sentry_specific_test_files
  59. # Also used in `getsentry-dispatch.yml` to dispatch backend tests on getsentry
  60. backend_dependencies: &backend_dependencies
  61. - 'requirements-*.txt'
  62. backend_build_changes: &backend_build_changes
  63. # If you change this line make sure that workflows using this action (e.g. acceptance, api_docs)
  64. # *and* file-filters would be updated as well
  65. - '.github/actions/setup-sentry/action.yml'
  66. - '.github/workflows/backend.yml'
  67. - '.pre-commit-config.yaml'
  68. - 'Makefile'
  69. - 'pyproject.toml'
  70. # `backend_src` filters on files that are backend changes excluding
  71. # changes to the tests/ directory.
  72. # If you want to filter on *all* backend files, use the `backend_all` filter.
  73. backend_src: &backend_src
  74. - *backend_build_changes
  75. - *backend_dependencies
  76. - '!(tests)/**/*.py'
  77. - '**/*.sh'
  78. - '**/*.pysnap'
  79. - 'src/sentry/!(static)/**'
  80. - 'src/sentry_plugins/**/*.html'
  81. - 'migrations_lockfile.txt'
  82. - 'config/**/*'
  83. - 'fixtures/search-syntax/**/*'
  84. backend_all: &backend_all
  85. - *backend_src
  86. - '**/*.py'
  87. - '**/*.pyi'
  88. # This is the ultimate controller for acceptance.yml
  89. acceptance: &acceptance
  90. - *frontend_all
  91. - *backend_all
  92. # This is verbose because backend_build_changes includes it, however,
  93. - '.github/actions/setup-sentry/action.yml'
  94. - '.github/workflows/acceptance.yml'
  95. api_docs: &api_docs
  96. - *backend_all
  97. - 'api-docs/**'
  98. - 'tests/apidocs/**'
  99. # This is the ultimate controller for backend.yml
  100. backend_any_type: &backend_any_type
  101. - *backend_all
  102. - *api_docs
  103. migrations_added:
  104. - added:
  105. - 'src/sentry/migrations/*'
  106. - 'src/sentry/feedback/migrations/*'
  107. - 'src/sentry/hybridcloud/migrations/*'
  108. - 'src/sentry/replays/migrations/*'
  109. # These files will trigger our workflow to check if lockfile
  110. # updates are needed
  111. migration_lockfile:
  112. - *backend_dependencies
  113. - '**/*.py'
  114. - .github/workflows/check-if-migration-is-required.yml
  115. - .github/workflows/scripts/migration-check.sh