You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
2.0 KiB

  1. name: Lint
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. jobs:
  8. check-commits:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v3
  12. - uses: webiny/action-conventional-commits@v1.0.3
  13. check-linting:
  14. runs-on: ubuntu-latest
  15. steps:
  16. - uses: actions/checkout@v3
  17. - name: Set up Python 3.10
  18. uses: actions/setup-python@v3
  19. with:
  20. python-version: "3.10"
  21. - name: Install dependencies
  22. run: |
  23. python -m pip install --upgrade pip
  24. python -m pip install tox
  25. - name: Check linting, formatting
  26. run: |
  27. tox -e check
  28. check-docs:
  29. runs-on: ubuntu-latest
  30. needs:
  31. - check-commits
  32. - check-linting
  33. steps:
  34. - uses: actions/checkout@v3
  35. - name: Set up Python 3.10
  36. uses: actions/setup-python@v3
  37. with:
  38. python-version: "3.10"
  39. - name: Install dependencies
  40. run: |
  41. python -m pip install --upgrade pip
  42. python -m pip install tox
  43. - name: Check documentation build
  44. run: |
  45. tox -e docs
  46. test:
  47. runs-on: ubuntu-latest
  48. strategy:
  49. fail-fast: false
  50. matrix:
  51. python-version: ["3.7", "3.8", "3.9", "3.10"]
  52. needs:
  53. - check-commits
  54. - check-linting
  55. steps:
  56. - uses: actions/checkout@v3
  57. - name: Set up Python ${{ matrix.python-version }}
  58. uses: actions/setup-python@v3
  59. with:
  60. python-version: ${{ matrix.python-version }}
  61. - uses: docker-practice/actions-setup-docker@master
  62. - name: Install dependencies
  63. run: |
  64. python -m pip install --upgrade pip
  65. python -m pip install tox
  66. - name: Run tests
  67. run: |
  68. tox -e tests
  69. build:
  70. runs-on: ubuntu-latest
  71. needs: test
  72. steps:
  73. - uses: actions/checkout@v3
  74. - name: Set up Python 3.10
  75. uses: actions/setup-python@v3
  76. with:
  77. python-version: "3.10"
  78. - name: Install dependencies
  79. run: |
  80. python -m pip install --upgrade pip
  81. python -m pip install tox
  82. - name: Run build
  83. run: |
  84. tox -e build