plugins-test.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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-16.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. # Until GH composite actions can use `uses`, we need to setup python here
  22. - uses: actions/setup-python@v2
  23. if: steps.changes.outputs.plugins == 'true'
  24. with:
  25. python-version: 2.7.17
  26. - name: Setup pip
  27. uses: ./.github/actions/setup-pip
  28. id: pip
  29. if: steps.changes.outputs.plugins == 'true'
  30. - name: pip cache
  31. uses: actions/cache@v2
  32. if: steps.changes.outputs.plugins == 'true'
  33. with:
  34. path: ${{ steps.pip.outputs.pip-cache-dir }}
  35. key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-*.txt') }}
  36. restore-keys: |
  37. ${{ runner.os }}-pip-
  38. - name: Setup sentry env
  39. uses: ./.github/actions/setup-sentry
  40. id: setup
  41. if: steps.changes.outputs.plugins == 'true'
  42. with:
  43. snuba: true
  44. python: 2
  45. - name: Run test
  46. if: steps.changes.outputs.plugins == 'true'
  47. run: |
  48. make test-plugins