plugins-test.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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: |
  40. ${{ runner.os }}-py${{ steps.python-version.outputs.python-version }}-pip${{ steps.pip.outputs.pip-version }}-${{ secrets.PIP_CACHE_VERSION }}-${{ hashFiles('requirements-*.txt', '!requirements-pre-commit.txt') }}
  41. restore-keys: |
  42. ${{ runner.os }}-py${{ steps.python-version.outputs.python-version }}-pip${{ steps.pip.outputs.pip-version }}-${{ secrets.PIP_CACHE_VERSION }}
  43. - name: Setup sentry env
  44. uses: ./.github/actions/setup-sentry
  45. id: setup
  46. if: steps.changes.outputs.plugins == 'true'
  47. with:
  48. snuba: true
  49. - name: Run test
  50. if: steps.changes.outputs.plugins == 'true'
  51. run: |
  52. make test-plugins