file-filters.yml 3.3 KB

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