file-filters.yml 4.7 KB

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