plugins-test.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. name: plugins
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - releases/**
  7. pull_request:
  8. jobs:
  9. test:
  10. name: plugins test
  11. runs-on: ubuntu-20.04
  12. timeout-minutes: 10
  13. steps:
  14. - uses: actions/checkout@v2
  15. - name: Check for python file changes
  16. uses: getsentry/paths-filter@v2
  17. id: changes
  18. with:
  19. token: ${{ github.token }}
  20. filters: .github/file-filters.yml
  21. - name: Set python version output
  22. id: python-version
  23. run: |
  24. echo "::set-output name=python-version::$(cat .python-version)"
  25. # Until GH composite actions can use `uses`, we need to setup python here
  26. - uses: actions/setup-python@v2
  27. if: steps.changes.outputs.plugins == 'true'
  28. with:
  29. python-version: ${{ steps.python-version.outputs.python-version }}
  30. - name: Setup pip
  31. uses: ./.github/actions/setup-pip
  32. id: pip
  33. if: steps.changes.outputs.plugins == 'true'
  34. - name: pip cache
  35. uses: actions/cache@v2
  36. if: steps.changes.outputs.plugins == 'true'
  37. with:
  38. path: ${{ steps.pip.outputs.pip-cache-dir }}
  39. key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-*.txt') }}
  40. restore-keys: |
  41. ${{ runner.os }}-pip-
  42. - name: Setup sentry env
  43. uses: ./.github/actions/setup-sentry
  44. id: setup
  45. if: steps.changes.outputs.plugins == 'true'
  46. with:
  47. snuba: true
  48. - name: Run test
  49. if: steps.changes.outputs.plugins == 'true'
  50. run: |
  51. make test-plugins