integration.yaml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. name: Lint and mock tests
  2. # Runs on every push and pull request — including PRs from forks. This workflow
  3. # is intentionally limited to lint + the mock provider so it can run safely on
  4. # untrusted code (no secrets, no cloud credentials).
  5. #
  6. # Cloud-provider integration tests live in integration-cloud.yaml, which uses
  7. # pull_request_target plus a maintainer-applied `safe-to-test` label and a
  8. # protected GitHub Environment.
  9. on:
  10. push:
  11. branches:
  12. - main
  13. paths-ignore:
  14. - 'docs/**'
  15. - '**.md'
  16. - '**.rst'
  17. - LICENSE
  18. pull_request:
  19. branches:
  20. - main
  21. paths-ignore:
  22. - 'docs/**'
  23. - '**.md'
  24. - '**.rst'
  25. - LICENSE
  26. workflow_dispatch: {}
  27. permissions:
  28. contents: read
  29. jobs:
  30. lint:
  31. name: Lint code
  32. runs-on: ubuntu-latest
  33. strategy:
  34. matrix:
  35. python-version: [ '3.13' ]
  36. steps:
  37. - name: Checkout code
  38. uses: actions/checkout@v6
  39. with:
  40. persist-credentials: false
  41. - name: Setup Python
  42. uses: actions/setup-python@v6
  43. with:
  44. python-version: ${{ matrix.python-version }}
  45. - name: Cache pip dir
  46. uses: actions/cache@v5
  47. with:
  48. path: ~/.cache/pip
  49. key: pip-cache-${{ matrix.python-version }}-lint
  50. - name: Install required packages
  51. run: pip install tox
  52. - name: Run tox
  53. run: tox -e lint
  54. mock:
  55. name: Mock-provider tests
  56. runs-on: ubuntu-latest
  57. strategy:
  58. matrix:
  59. python-version: ['3.13']
  60. steps:
  61. - name: Checkout code
  62. uses: actions/checkout@v6
  63. with:
  64. persist-credentials: false
  65. - name: Setup Python
  66. uses: actions/setup-python@v6
  67. with:
  68. python-version: ${{ matrix.python-version }}
  69. - name: Cache pip dir
  70. uses: actions/cache@v5
  71. with:
  72. path: ~/.cache/pip
  73. key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml', '**/requirements.txt') }}
  74. - name: Install required packages
  75. run: pip install tox
  76. - name: Run tox
  77. run: tox -e py${{ matrix.python-version }}-mock
  78. env:
  79. PYTHONUNBUFFERED: "True"