development-environment.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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.8
  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. commit_sha: ${{ github.event.pull_request.head.sha }}
  45. devenv:
  46. runs-on: ubuntu-22.04
  47. timeout-minutes: 5
  48. steps:
  49. - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
  50. - uses: getsentry/action-setup-venv@a133e6fd5fa6abd3f590a1c106abda344f5df69f # v2.1.0
  51. with:
  52. python-version: 3.11.8
  53. cache-dependency-path: |
  54. requirements-dev.txt
  55. requirements-dev-frozen.txt
  56. install-cmd: python3 -m tools.hack_pip && pip install -r requirements-dev.txt -c requirements-dev-frozen.txt
  57. - name: devenv sync
  58. run: |
  59. devenv --nocoderoot sync