development-environment.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. name: dev env
  2. on:
  3. pull_request:
  4. paths:
  5. - '.pre-commit-config.yaml'
  6. - 'Makefile'
  7. - '.github/workflows/development-environment.yml'
  8. - 'requirements-*.txt'
  9. - '.python-version'
  10. - '.envrc'
  11. - 'Brewfile'
  12. - 'scripts/**'
  13. - 'tools/**'
  14. - 'src/sentry/runner/commands/devserver.py'
  15. - 'src/sentry/runner/commands/devservices.py'
  16. - 'bin/load-mocks'
  17. # Cancel in progress workflows on pull_requests.
  18. # https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
  19. concurrency:
  20. group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  21. cancel-in-progress: true
  22. # hack for https://github.com/actions/cache/issues/810#issuecomment-1222550359
  23. env:
  24. SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3
  25. jobs:
  26. test:
  27. runs-on: ubuntu-22.04
  28. timeout-minutes: 5
  29. steps:
  30. - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
  31. - uses: getsentry/action-setup-venv@a133e6fd5fa6abd3f590a1c106abda344f5df69f # v2.1.0
  32. with:
  33. python-version: 3.11.6
  34. cache-dependency-path: |
  35. requirements-dev.txt
  36. requirements-dev-frozen.txt
  37. install-cmd: python3 -m tools.hack_pip && pip install -r requirements-dev.txt -c requirements-dev-frozen.txt
  38. - name: test-tools
  39. run: make test-tools
  40. - name: Handle artifacts
  41. uses: ./.github/actions/artifacts
  42. with:
  43. token: ${{ secrets.CODECOV_TOKEN }}
  44. devenv:
  45. runs-on: ubuntu-22.04
  46. timeout-minutes: 5
  47. steps:
  48. - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
  49. - uses: getsentry/action-setup-venv@a133e6fd5fa6abd3f590a1c106abda344f5df69f # v2.1.0
  50. with:
  51. python-version: 3.11.6
  52. cache-dependency-path: |
  53. requirements-dev.txt
  54. requirements-dev-frozen.txt
  55. install-cmd: python3 -m tools.hack_pip && pip install -r requirements-dev.txt -c requirements-dev-frozen.txt
  56. - name: devenv sync
  57. run: |
  58. devenv --nocoderoot sync