api-docs-test.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. name: api docs
  2. on:
  3. push:
  4. branches:
  5. - master
  6. pull_request:
  7. # TODO(joshuarli): Confirm it passes on 3.8.12.
  8. branches:
  9. - master
  10. jobs:
  11. test:
  12. name: api docs test
  13. runs-on: ubuntu-20.04
  14. strategy:
  15. matrix:
  16. python-version: [3.8.12]
  17. steps:
  18. - uses: actions/checkout@v2
  19. - name: Check for python and `api-docs` file changes
  20. uses: getsentry/paths-filter@v2
  21. id: changes
  22. with:
  23. token: ${{ github.token }}
  24. filters: .github/file-filters.yml
  25. - uses: volta-cli/action@v1
  26. if: steps.changes.outputs.api_docs == 'true'
  27. - name: Setup sentry python env (python ${{ matrix.python-version }})
  28. uses: ./.github/actions/setup-sentry
  29. id: setup
  30. if: steps.changes.outputs.api_docs == 'true'
  31. with:
  32. python-version: ${{ matrix.python-version }}
  33. pip-cache-version: ${{ secrets.PIP_CACHE_VERSION }}
  34. snuba: true
  35. - name: Run API docs tests
  36. if: steps.changes.outputs.api_docs == 'true'
  37. run: |
  38. make test-api-docs