file-filters.yml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. # These files will trigger our workflow to check if lockfile
  79. # updates are needed
  80. migration_lockfile:
  81. - *backend_dependencies
  82. - '**/*.py'
  83. - .github/workflows/check-if-migration-is-required.yml
  84. - .github/workflows/scripts/migration-check.sh