python-deps.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: python deps
  2. on:
  3. pull_request:
  4. paths:
  5. - '.github/actions/setup-python/action.yml'
  6. - '.github/workflows/python-deps.yml'
  7. - 'requirements-*.txt'
  8. jobs:
  9. # This workflow makes sure that Python dependencies install correctly for
  10. # a) our current version b) the next version we're targetting
  11. python-deps:
  12. name: install
  13. runs-on: ${{ matrix.os }}
  14. timeout-minutes: 20
  15. strategy:
  16. matrix:
  17. os: [macos-11.0, ubuntu-20.04]
  18. python-version: [3.6.13, 3.8.12]
  19. fail-fast: false
  20. env:
  21. PIP_DISABLE_PIP_VERSION_CHECK: on
  22. # There's a check that prevents make install-py-dev to work if the developer has not
  23. # explicitely set the intention to use a non-default Python version
  24. SENTRY_PYTHON_VERSION: ${{ matrix.python-version }}
  25. steps:
  26. - uses: actions/checkout@v2
  27. - name: Install prerequisites
  28. env:
  29. HOMEBREW_NO_AUTO_UPDATE: on
  30. # Necessary packages for some Python deps
  31. run: |
  32. brew install libxmlsec1
  33. - name: Setup Python
  34. uses: ./.github/actions/setup-python
  35. with:
  36. # Non-default value since install-py-dev installs all requirements files
  37. # We also want to bust the cache if the action and workflow change
  38. cache-files-hash: ${{ hashFiles('requirements-*.txt', '.github/actions/setup-python/action.yml', '.github/workflows/python-deps.yml') }}
  39. - name: Install dependencies
  40. run: |
  41. python -m venv .venv
  42. source .venv/bin/activate
  43. make install-py-dev
  44. # This exercises the requirements-pre-commit.txt file
  45. make setup-git